AdminArticleValidate.php
1.1 KB
<?php
// +----------------------------------------------------------------------
// | bronet [ 以客户为中心 以奋斗者为本 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.bronet.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;
use think\Validate;
class AdminArticleValidate extends Validate
{
protected $rule = [
'categories' => 'require',
'post_title' => 'require',
];
protected $message = [
'categories.require' => '请指定文章分类!',
'post_title.require' => '文章标题不能为空!',
];
protected $scene = [
// 'add' => ['user_login,user_pass,user_email'],
// 'edit' => ['user_login,user_email'],
];
}