提示校验优化
This commit is contained in:
@@ -81,7 +81,7 @@ class UserController
|
||||
{
|
||||
$email = Util::getParam($request, 'email');
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
return Util::fail([], trans('required_not_null'));
|
||||
return Util::fail([], trans('email_error'));
|
||||
}
|
||||
|
||||
// 生成验证码
|
||||
@@ -138,6 +138,9 @@ class UserController
|
||||
if ($code != $verification_code) {
|
||||
return Util::fail([], trans('code_error'));
|
||||
}
|
||||
if(strlen($password) < 6) {
|
||||
return Util::fail([], trans('password_short'));
|
||||
}
|
||||
|
||||
//加密
|
||||
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user