1234567891011121314151617181920212223242526 |
- <?php
- namespace app\admin\validate\member;
- use support\Validate;
- class RuleAddedValidate extends Validate
- {
- protected $rule = [
- 'rule_added_id|ID' => 'require|alphaDash',
- 'rule_added_classify|归类' => 'max:32',
- 'rule_added_status|状态' => 'in:ACTIVED,DISABLED',
- 'rule_added_category|分类' => 'max:32',
- 'rule_added_name|规则名称' => 'require|max:64',
- 'rule_added_goods_diff|重复产品处理' => 'in:SUM,REPLACE,NONE',
- 'rule_added_sort|排序' => 'integer',
- 'rule_added_groupby|分组' => 'max:32',
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['rule_added_classify', 'rule_added_status', 'rule_added_category', 'rule_added_name', 'rule_added_goods_diff', 'rule_added_sort', 'rule_added_groupby'],
- 'update' => ['rule_added_id', 'rule_added_classify', 'rule_added_status', 'rule_added_category', 'rule_added_name', 'rule_added_goods_diff', 'rule_added_sort', 'rule_added_groupby']
- ];
- }
|