<?php

namespace App\Http\Requests;


use Illuminate\Validation\Rule;

class AuthenticationRequest extends BaseRequest
{
    public function rules()
    {
        return [
            'mobile' => ['required', 'regex:/^1[3456789]\d{9}$/'],
            'verifyKey' => 'bail|required|string',
            'smsCode' => 'bail|required',
        ];
    }

    public function messages()
    {
        return [
            'mobile.required'=>"手机号码必须",
            'mobile.regex'=>"手机号码格式错误",
            'verifyKey.required'=>"验证码必须",
            'smsCode.required'=>"短信验证码必须",
        ];
    }
}
