初始化项目
This commit is contained in:
33
application/common/validate/Config.php
Normal file
33
application/common/validate/Config.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\validate;
|
||||
|
||||
/**
|
||||
* 设置模型
|
||||
*/
|
||||
class Config extends \think\Validate{
|
||||
|
||||
protected $rule = array(
|
||||
'name' => 'require|unique',
|
||||
'title' => 'require',
|
||||
);
|
||||
|
||||
protected $message = array(
|
||||
'name.require' => '配置标识必须',
|
||||
'name.unique' => '配置标识已经存在',
|
||||
'title' => '配置名称必须',
|
||||
);
|
||||
|
||||
protected $scene = array(
|
||||
'add' => array('name', 'title'),
|
||||
'edit' => array('title')
|
||||
);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user