Commit 780eacda by lujunyi

身份证验证

parent 79a6914f
...@@ -147,7 +147,7 @@ protected function form() ...@@ -147,7 +147,7 @@ protected function form()
if ($status == 1 && $pharmacistNum <= 0) { if ($status == 1 && $pharmacistNum <= 0) {
return $form->response()->error('开启失败,至少启用一个药师才可以开启药店~'); return $form->response()->error('开启失败,至少启用一个药师才可以开启药店~');
} }
if (! preg_match('/^1[3456789]{1}[0-9]{9}$/', $form->mobile)) { if ($form->mobile && ! preg_match('/^1[3456789]{1}[0-9]{9}$/', $form->mobile)) {
$form->responseValidationMessages('mobile', '手机号格式错误~'); $form->responseValidationMessages('mobile', '手机号格式错误~');
return $form->response()->error('手机号格式错误'); return $form->response()->error('手机号格式错误');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment