Snsmember.php 767 B

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