first commit
This commit is contained in:
42
application/common/validate/Message.php
Normal file
42
application/common/validate/Message.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +------------------------------------------------+
|
||||
// |http://www.cjango.com |
|
||||
// +------------------------------------------------+
|
||||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||||
// +------------------------------------------------+
|
||||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||||
// +------------------------------------------------+
|
||||
namespace app\common\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Message extends Validate
|
||||
{
|
||||
|
||||
/**
|
||||
* 验证规则
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'from_uid' => 'require',
|
||||
'to_uid' => 'require',
|
||||
'content' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'content.require' => '内容必须填写',
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
* @var array
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['from_uid', 'to_uid', 'content'],
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user