作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

手机号格式验证

... ... @@ -18,6 +18,7 @@ use think\Db;
use think\Exception;
use think\exception\PDOException;
use EasyWeChat\Kernel\Exceptions\InvalidConfigException;
use think\Validate;
/**
* 会员接口
... ... @@ -744,6 +745,7 @@ class User extends Api
empty($post['idcard_front']) && $this->error('请上传身份证正面');
empty($post['idcard_back']) && $this->error('请上传身份证反面');
empty($post['certificates']) && $this->error('请上传从医资格证');
!Validate::regex($post['mobile'], '/^1\d{10}$/') && $this->error('联系电话格式不正确');
$doctor = Doctor::where('user_id',$this->auth->id)->find();
$doctor['status'] == '1' && $this->error('已通过审核');
if(!$doctor){
... ...