RulePricingValidate.php 972 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\admin\validate\member;
  3. use support\Validate;
  4. class RulePricingValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'rule_pricing_id|ID' => 'require|alphaDash',
  8. 'rule_pricing_classify|归类' => 'max:32',
  9. 'rule_pricing_status|状态' => 'in:ACTIVED,DISABLED',
  10. 'rule_pricing_category|分类' => 'max:32',
  11. 'rule_pricing_name|规则名称' => 'require|max:64',
  12. 'rulr_priceing_nbr|规则数值' => 'float',
  13. 'rule_pricing_sort|排序' => 'integer',
  14. 'rule_pricing_groupby|分组' => 'max:32',
  15. ];
  16. protected $message = [];
  17. protected $scene = [
  18. 'add' => ['rule_pricing_status', 'rule_pricing_category', 'rule_pricing_name', 'rulr_priceing_nbr', 'rule_pricing_sort', 'rule_pricing_groupby'],
  19. 'update' => ['rule_pricing_id', 'rule_pricing_status', 'rule_pricing_category', 'rule_pricing_name', 'rulr_priceing_nbr', 'rule_pricing_sort', 'rule_pricing_groupby']
  20. ];
  21. }