Storeclass.php 777 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Storeclass extends Validate
  15. {
  16. protected $rule = [
  17. 'storeclass_name' => 'require'
  18. ];
  19. protected $message = [
  20. 'storeclass_name.require' => '分类名称必填'
  21. ];
  22. protected $scene = [
  23. 'store_class_add' => ['storeclass_name'],
  24. 'store_class_edit' => ['storeclass_name']
  25. ];
  26. }