AdminStarHotelValidate.php
1.2 KB
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;
use think\Validate;
class AdminStarHotelValidate extends Validate
{
protected $rule = [
'city_id' => 'require',
'post_title' => 'require',
'post_excerpt' => 'require',
];
protected $message = [
'city_id.require' => '请选择城市!',
'post_title.require' => '文章标题不能为空!',
'post_excerpt.require' => '文章简介不能为空!',
];
protected $scene = [
// 'add' => ['user_login,user_pass,user_email'],
// 'edit' => ['user_login,user_email'],
];
}