ArticleValidate.php 523 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\admin\validate\sys_manage;
  3. use support\Validate;
  4. class ArticleValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'id' => 'require|integer',
  8. 'title|标题' => 'require|max:64',
  9. 'author|作者' => 'max:64',
  10. 'introduce|简介' => 'max:255',
  11. 'sort|排序'=>'integer'
  12. ];
  13. protected $message = [];
  14. protected $scene = [
  15. 'add' => ['title', 'author', 'introduce','sort'],
  16. 'update' => ['id', 'title', 'author', 'introduce','sort'],
  17. ];
  18. }