12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Http\Requests\Coach\Auth;
- use Illuminate\Foundation\Http\FormRequest;
- class RealAuthRequest extends FormRequest
- {
- public function authorize(): bool
- {
- return true;
- }
- public function rules(): array
- {
- return [
- 'real_name' => 'required|string|max:50',
- 'id_card' => 'required|string|size:18',
- 'id_card_front_photo' => 'required|string|max:255',
- 'id_card_back_photo' => 'required|string|max:255',
- 'id_card_hand_photo' => 'required|string|max:255'
- ];
- }
- public function messages(): array
- {
- return [
- 'real_name.required' => '真实姓名不能为空',
- 'real_name.max' => '真实姓名不能超过50个字符',
- 'id_card.required' => '身份证号不能为空',
- 'id_card.size' => '身份证号必须是18位',
- 'id_card_front_photo.required' => '身份证正面照片不能为空',
- 'id_card_front_photo.max' => '身份证正面照片地址不能超过255个字符',
- 'id_card_back_photo.required' => '身份证反面照片不能为空',
- 'id_card_back_photo.max' => '身份证反面照片地址不能超过255个字符',
- 'id_card_hand_photo.required' => '手持身份证照片不能为空',
- 'id_card_hand_photo.max' => '手持身份证照片地址不能超过255个字符'
- ];
- }
- }
|