zhangchangchun 5 anni fa
parent
commit
6474c9143d
1 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 9 9
      app/Http/Controllers/V1/ShopController.php

+ 9 - 9
app/Http/Controllers/V1/ShopController.php

@@ -44,7 +44,7 @@ class ShopController extends Controller {
             'province_id' => 'required|integer|digits_between:1,7',
             'city_name' => 'required|string:max:50',
             'city_id' => 'required|integer|digits_between:1,7',
-            'contact_name' => 'string|max:50',
+            'contact_name' => 'string|max:6',
             'contact_mobile' => 'max:16',
             'shop_desc' => 'string|max:100',
             'status' =>['required',Rule::in([0,1])],
@@ -83,26 +83,26 @@ class ShopController extends Controller {
     {
         $data = $request->all();
         $validator = Validator::make($data, [
-            'shop_name' => 'required|max:11',
-            'shop_short_name' => 'required|string|max:100',
+            'shop_name' => 'required|max:50',
+            'shop_short_name' => 'required|string|max:50',
             'mobile' => 'required|max:11',
-            'address' => 'required|string',
+            'address' => 'required|string|max:50',
             'province_name' => 'required|string|max:50',
             'province_id' => 'required|integer|digits_between:1,7',
             'city_name' => 'required|string:max:50',
             'city_id' => 'required|integer|digits_between:1,7',
-            'contact_name' => 'string|max:50',
+            'contact_name' => 'string|max:6',
             'contact_mobile' => 'max:16',
-            'shop_desc' => 'string|max:500',
+            'shop_desc' => 'string|max:100',
             'status' =>['required',Rule::in([0,1])],
             'logo_img' => 'string',
             'license_img' => 'required|string',
             'food_trans_license' => 'required|string',
             'other_license' => 'string',
-            'proportion'=>'required|digits_between:1,100|integer',
+            'proportion'=>'required|between:0,100',
             'verify_type'=>['required',Rule::in([0,1])],
-            'account'=>'string|max:20',
-            'password'=>'string|min:6|max:18',
+            'account'=>'string|max:16',
+            'password'=>'string|min:6|max:16',
             'shop_id'=>'integer|required',
             'shop_account_id'=>'integer|required',
         ]);