Snsmember.php 1001 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Snsmember extends Validate
  15. {
  16. protected $rule = [
  17. 'membertag_name' => 'require',
  18. 'membertag_sort' => 'require|number',
  19. ];
  20. protected $message = [
  21. 'membertag_name.require' => '会员标签名称不能为空',
  22. 'membertag_sort.require' => '会员标签排序只能为数字',
  23. 'membertag_sort.number' => '会员标签排序只能为数字',
  24. ];
  25. protected $scene = [
  26. 'tag_add' => ['membertag_name', 'membertag_sort'],
  27. 'tag_edit' => ['membertag_name', 'membertag_sort'],
  28. ];
  29. }