1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Http\Requests\Coach;
- use Illuminate\Foundation\Http\FormRequest;
- class SubmitQualificationRequest extends FormRequest
- {
- public function authorize()
- {
- return true;
- }
- public function rules()
- {
- return [
- 'qual_type' => 'required|integer|in:1,2,3',
- 'qual_photo' => 'required|string|max:2048',
- 'business_license' => 'required|string|max:2048',
- 'health_cert' => 'required|string|max:2048',
- ];
- }
- public function messages()
- {
- return [
- 'qual_type.required' => '资质类型不能为空',
- 'qual_type.integer' => '资质类型必须是整数',
- 'qual_type.in' => '资质类型只能是1(初级)、2(中级)或3(高级)',
- 'qual_photo.required' => '资质证书照片不能为空',
- 'qual_photo.string' => '资质证书照片格式不正确',
- 'qual_photo.max' => '资质证书照片数据过大',
- 'business_license.required' => '营业执照照片不能为空',
- 'business_license.string' => '营业执照照片格式不正确',
- 'business_license.max' => '营业执照照片数据过大',
- 'health_cert.required' => '健康证照片不能为空',
- 'health_cert.string' => '健康证照片格式不正确',
- 'health_cert.max' => '健康证照片数据过大',
- ];
- }
- }
|