Commit 4d03b125 authored by hujun's avatar hujun

编辑商铺验证

parent 722e8d42
...@@ -47,9 +47,8 @@ class HouseService ...@@ -47,9 +47,8 @@ class HouseService
{ {
$result = []; $result = [];
$validate = new HouseValidate(); $validate = new HouseValidate();
$check = $validate->check($data);
if (true !== $check) { if (!$validate->check($data)) {
$result['status'] = 'fail'; $result['status'] = 'fail';
$result['msg'] = $validate->getError(); $result['msg'] = $validate->getError();
return $result; return $result;
......
...@@ -21,7 +21,7 @@ class HouseValidate extends Validate ...@@ -21,7 +21,7 @@ class HouseValidate extends Validate
'disc' => 'require|length:1,60', 'disc' => 'require|length:1,60',
'market_area' => 'require|between:0,9999999', 'market_area' => 'require|between:0,9999999',
'shop_area_start' => 'require|between:0,9999999', 'shop_area_start' => 'require|between:0,9999999',
'rent_type' => 'require|in:1,2,3', 'rent_type' => 'require|in:"1","2","3","4"',
'rent_price' => 'require', 'rent_price' => 'require',
'industry_type' => 'require', 'industry_type' => 'require',
'shop_type' => 'require|in:0,1', 'shop_type' => 'require|in:0,1',
......
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 to comment