You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
957 B

<?php
declare(strict_types=1);
namespace App\Request\v3;
use App\Request\BaseFormRequest;
class UserBindTelRequest extends BaseFormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'user_id' => 'required|nonempty|exists_enable:lanzu_user,id',
'tel' => 'required|nonempty|tel',
'verify_code' => 'required|nonempty|numeric|strlen:6,6',
];
}
/**
* @return array
*/
public function messages(): array
{
return [
'user_id.*' => ':attribute未登录或无效',
'tel.*' => ':attribute无效',
'verify_code.*' => ':attribute格式有误',
];
}
public function attributes(): array
{
return [
'user_id' => '用户',
'tel' => '手机号码',
'verify_code' => '验证码',
];
}
}