ArticleValidate.php 576 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-03-26
  7. *
  8. *
  9. */
  10. namespace app\validate\admin;
  11. use think\Validate;
  12. class ArticleValidate extends Validate
  13. {
  14. protected $failException = true;
  15. protected $rule = [
  16. 'cid|选择分类' => 'require|integer',
  17. 'title|标题' => 'require|max:32',
  18. 'content|内容' => 'require',
  19. 'author|作者' => 'require',
  20. 'image_input|图片' => 'require|max:128',
  21. 'is_hot|是否热门' => 'require|integer',
  22. 'is_banner|是否为Banner' => 'require|integer'
  23. ];
  24. }