ArticleValidate.php 493 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\admin\validate\sys_manage;
  3. use think\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. }