User.php
454 字节
<?php
namespace app\admin\validate;
use think\Validate;
class User extends Validate
{
/**
* 验证规则
*/
protected $rule = [
// 'username' => 'require|length:6,18',
];
/**
* 提示消息
*/
protected $message = [
// 'username.length' => '用户名长度需为6-18位'
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}