RuleAddedValidate.php 1012 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\admin\validate\member;
  3. use support\Validate;
  4. class RuleAddedValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'rule_added_id|ID' => 'require|alphaDash',
  8. 'rule_added_classify|归类' => 'max:32',
  9. 'rule_added_status|状态' => 'in:ACTIVED,DISABLED',
  10. 'rule_added_category|分类' => 'max:32',
  11. 'rule_added_name|规则名称' => 'require|max:64',
  12. 'rule_added_goods_diff|重复产品处理' => 'in:SUM,REPLACE,NONE',
  13. 'rule_added_sort|排序' => 'integer',
  14. 'rule_added_groupby|分组' => 'max:32',
  15. ];
  16. protected $message = [];
  17. protected $scene = [
  18. 'add' => ['rule_added_classify', 'rule_added_status', 'rule_added_category', 'rule_added_name', 'rule_added_goods_diff', 'rule_added_sort', 'rule_added_groupby'],
  19. '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']
  20. ];
  21. }