Fleaclass.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class Fleaclass extends Validate
  16. {
  17. protected $rule = [
  18. 'fleaclass_name'=>'require',
  19. 'fleaclass_sort'=>'require|number'
  20. ];
  21. protected $message = [
  22. 'fleaclass_name.require'=>'分类名称不能为空',
  23. 'fleaclass_sort.require'=>'分类排序仅能为数字',
  24. 'fleaclass_sort.number'=>'分类排序仅能为数字'
  25. ];
  26. protected $scene = [
  27. 'goods_class_add' => ['fleaclass_name', 'fleaclass_sort'],
  28. 'goods_class_edit' => ['fleaclass_name', 'fleaclass_sort'],
  29. ];
  30. }