|
@@ -22,8 +22,8 @@ class GoodValidate extends Validate
|
|
|
'unit_id|单位id' => 'require|number|gt:0',
|
|
|
'good_remark|商品备注' => 'require|max:255',
|
|
|
'type|商品类型' => 'require|number|in:1,2',
|
|
|
- 'price|售价' => 'require|float|max:99999999.99',
|
|
|
- 'id|主键', 'require|number|gt:0',
|
|
|
+ 'price|售价' => 'requireIf:type,2|float|max:99999999.99',
|
|
|
+ 'id|主键' => 'require|number|gt:0',
|
|
|
];
|
|
|
|
|
|
//创建商品
|