ArticleValidate.php 617 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2021 勾股工作室
  4. * @license https://opensource.org/licenses/Apache-2.0
  5. * @link https://www.gougucms.com
  6. */
  7. namespace app\admin\validate;
  8. use think\Validate;
  9. class ArticleValidate extends Validate
  10. {
  11. protected $rule = [
  12. 'cate_id' => 'require',
  13. 'title' => 'require',
  14. 'thumb' => 'require',
  15. 'content' => 'require',
  16. ];
  17. protected $message = [
  18. 'cate_id.require' => '所属分类不能为空',
  19. 'title.require' => '文章标题不能为空',
  20. 'thumb.require' => '缩略图不能为空',
  21. 'content.require' => '文章内容不能为空',
  22. ];
  23. }