<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class SmsRequest extends BaseRequest
{
    public function rules()
    {
        return [
            'mobile' => ['required', 'regex:/^1[3456789]\d{9}$/'],
            'event' => 'required'
        ];
    }

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