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|string|max:50',
- '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.string' => '资质类型必须是字符串',
- 'qual_type.max' => '资质类型不能超过50个字符',
- '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' => '健康证照片数据过大',
- ];
- }
- }
|