|
@@ -32,13 +32,13 @@ class Donate extends Api
|
|
|
],$request
|
|
|
);
|
|
|
if($where['full_name']=='')$this->error('姓名不能为空');
|
|
|
- if(IdentityCard::isValid($where['id_card']))$this->error('身份证号不正确!');
|
|
|
+ if(!IdentityCard::isValid($where['id_card']))$this->error('身份证号不正确!');
|
|
|
if($where['vocation']=='')$this->error('职业不能为空');
|
|
|
if($where['category_ids']=='')$this->error('捐献类型不能空');
|
|
|
if($where['executor_relation']=='')$this->error('执行人关系');
|
|
|
if(!preg_match("/^1\d{10}$/", $where['mobile'])) $this->error('手机号不对');
|
|
|
if(!preg_match("/^1\d{10}$/", $where['executor_mobile'])) $this->error('执行人移动电话不对');
|
|
|
- if(IdentityCard::isValid($where['executor_id_card']))$this->error('执行人身份证号不正确!');
|
|
|
+ if(!IdentityCard::isValid($where['executor_id_card']))$this->error('执行人身份证号不正确!');
|
|
|
$this->success(DonateModel::create($where));
|
|
|
}
|
|
|
|