diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 583f96a..92c2a2f 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -660,9 +660,7 @@ class User extends Api 'eamil' => '电子邮箱格式不正确', 'order_no' => '请输入订单编号', ]; - $validate = new \think\Validate(); - $validate->rule($rule); - $validate->message($msg); + $validate = new \think\Validate($rule,$msg); if (!$validate->check($data)) $this->error($validate->getError()); if ($type == 1){ $data = [ @@ -686,8 +684,7 @@ class User extends Api 'company_address' => '请填写公司地址', 'bank' => '请填写开户银行', ]; - $validate->rule($rule); - $validate->message($msg); + $validate = new \think\Validate($rule,$msg); if (!$validate->check($data)) $this->error($validate->getError()); }else{ $data = [ @@ -699,8 +696,7 @@ class User extends Api $msg = [ 'company_mobile' => '请填写个人/非企业单位名称', ]; - $validate->rule($rule); - $validate->message($msg); + $validate = new \think\Validate($rule,$msg); if (!$validate->check($data)) $this->error($validate->getError()); } //校验订单编号