SysArticle.php 410 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. class SysArticle extends Validate{
  5. protected $rule = [
  6. 'name|标识' => 'require|unique:sys_article|length:1,30',
  7. 'title|标题' => 'require',
  8. ];
  9. protected $message = [
  10. 'name.length' => '标识必须30字以内',
  11. 'name.unique' => '标识名称已被占用',
  12. ];
  13. protected $scene = [
  14. ];
  15. }