first commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Administrator
|
||||
* Date: 2020/4/24
|
||||
* Time: 16:17
|
||||
*/
|
||||
|
||||
namespace app\admin\validate\custom;
|
||||
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Message extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require|number',
|
||||
'replyCon' => 'require'
|
||||
];
|
||||
|
||||
/**
|
||||
* 错误提示
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'id.require' => '编号必须',
|
||||
'id.number' => '编号为数字',
|
||||
'replyCon.require' => '请输入回复内容',
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* 应用场景
|
||||
* @var array
|
||||
*/
|
||||
protected $scene = [
|
||||
|
||||
//授权
|
||||
'reply' => ['id','replyCon'],
|
||||
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user