|
|
@@ -250,7 +250,7 @@ class User extends Api
|
|
|
if (!$email && !$mobile) {
|
|
|
$this->error(__('手机号或邮箱至少任选其一'));
|
|
|
}
|
|
|
- if ($mobile || !Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
+ if ($mobile && !Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('Mobile is incorrect'));
|
|
|
}
|
|
|
if (!$email) {
|