zac3533 преди 1 година
родител
ревизия
11d6668b2f
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      application/api/controller/User.php

+ 1 - 2
application/api/controller/User.php

@@ -258,11 +258,10 @@ class User extends Api
         $new_pwd        = $this->request->post("new_pwd", '', null);
         $confirm_pwd    = $this->request->post("confirm_pwd", '', null);
         $rule = [
-            'mobile'        => 'require|mobile',
+            'mobile'        => 'require|regex:^1\d{10}$',
             'new_pwd'       => 'require|regex:\S{6,30}',
             'confirm_pwd'   => 'require|regex:\S{6,30}|confirm:new_pwd',
         ];
-
         $msg = [
             'mobile.mobile'   => __('Mobile is incorrect'), 
             'new_pwd.confirm' => __('Password and confirm password don\'t match')