|
|
@ -22,13 +22,14 @@ class UserRequest extends FormRequest |
|
|
public function rules(): array |
|
|
public function rules(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
'user_id' => 'required|nonempty|integer|exists:ims_cjdc_user,id', |
|
|
|
|
|
|
|
|
'user_id' => 'required|nonempty|integer|exists:ims_cjdc_user,id|exists_enable:lanzu_service_personnel,user_id,status=1', |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function messages(): array |
|
|
public function messages(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
|
|
|
'user_id.exists_enable' => '服务专员不存在或被禁用', |
|
|
'user_id.*' => ':attribute信息不正确', |
|
|
'user_id.*' => ':attribute信息不正确', |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|