Article.php 432 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. class Article extends Validate{
  5. protected $rule = [
  6. 'title|名称' => 'require|length:1,200',
  7. 'cate_id|分类' => 'require|gt:0',
  8. // 'path|文件' => 'require',
  9. 'description|描述' => 'require',
  10. ];
  11. protected $message = [
  12. 'title.length' => '名称必须200字以内',
  13. ];
  14. protected $scene = [
  15. ];
  16. }