Snsmember.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 Snsmember extends Validate
  16. {
  17. protected $rule = [
  18. 'membertag_name'=>'require',
  19. 'membertag_sort'=>'require|number',
  20. ];
  21. protected $message = [
  22. 'membertag_name.require'=>'会员标签名称不能为空',
  23. 'membertag_sort.require'=>'会员标签排序只能为数字',
  24. 'membertag_sort.number'=>'会员标签排序只能为数字',
  25. ];
  26. protected $scene = [
  27. 'tag_add' => ['membertag_name', 'membertag_sort'],
  28. 'tag_edit' => ['membertag_name', 'membertag_sort'],
  29. ];
  30. }