thinkphp验证器规则
$rule = [ 'password' => 'require|min:6|confirm:repassword', ]; $message = [ 'password.require' => '密码不能为空', 'password.min' => '密码长度必须大于6位', 'password.confirm'=>'两次密码输入不一致', ]; |
repassword为请求的key值.
$rule = [ 'password' => 'require|min:6|confirm:repassword', ]; $message = [ 'password.require' => '密码不能为空', 'password.min' => '密码长度必须大于6位', 'password.confirm'=>'两次密码输入不一致', ]; |
repassword为请求的key值.