PromotionLists.php 675 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\admin\validate\promotion;
  3. /**
  4. * @title : 宣传详情 验证器
  5. * @desc :
  6. * @icon fa fa-leaf
  7. */
  8. use think\Validate;
  9. class PromotionLists extends Validate
  10. {
  11. protected $rule = [
  12. "title"=>"require|chsAlphaNum|length:2,255",
  13. "subtitle"=>"require|length:2,255",
  14. "detail_img"=>"require"
  15. ];
  16. protected $message =[
  17. 'title.require'=>'标题不能为空',
  18. 'title.chsAlphaNum'=>'标题只能是汉字、字母和数字',
  19. 'title.length'=>'标题长度只能在2-255之间',
  20. 'subtitle.require'=>'副标题不能为空',
  21. 'subtitle.length'=>'副标题长度只能在2-255之间',
  22. 'detail_img.require'=>'详情图片不能为空'
  23. ];
  24. }