ProtocolValidate.php
1.1 KB
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 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 ProtocolValidate extends Validate
{
protected $rule = [
'title' => 'require',
'content' => 'require',
'type' => 'require',
];
protected $message = [
'title.require' => '企业名称不为空!',
'content.require' => '内容不能为空!',
'type.require' => '请选择类型!',
];
protected $scene = [
'add' => ['title','content','type'],
'edit' => ['title','content','type'],
];
}