| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Http\Requests\LaborApply;
- use Illuminate\Foundation\Http\FormRequest;
- use Illuminate\Support\Facades\Auth;
- class LaborApplyRequest extends FormRequest
- {
- /**
- * Determine if the user is authorized to make this request.
- *
- * @return bool
- */
- public function authorize()
- {
- return true;
- }
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules()
- {
- return [
- 'warehouse_id' => 'required',
- 'user_workgroup_id' => 'required',
- 'man_num' => 'required',
- 'woman_num' => 'required',
- 'remark' => 'required',
- ];
- }
- public function messages()
- {
- return [
- 'warehouse_id.required' =>'不能为空。',
- 'user_workgroup_id.required' => '不能为空。',
- 'man_num.required' => '不能为空。',
- 'woman_num.required' => '不能为空。',
- 'remark.required' => '不能为空。',
- ];
- }
- }
|