first commit
This commit is contained in:
33
application/common/validate/Advert.php
Normal file
33
application/common/validate/Advert.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// +------------------------------------------------+
|
||||
// |http://www.cjango.com |
|
||||
// +------------------------------------------------+
|
||||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||||
// +------------------------------------------------+
|
||||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||||
// +------------------------------------------------+
|
||||
namespace app\common\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Advert extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'title' => 'require',
|
||||
'limit' => 'require|number',
|
||||
];
|
||||
|
||||
/**
|
||||
* 错误提示消息
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'title.require' => 'Banner名称必须填写',
|
||||
'limit.require' => '显示上限必须填写',
|
||||
'limit.number' => '显示上限必须填数字',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user