审查视图

application/admin/validate/User.php 454 字节
何书鹏 authored
1 2 3 4 5 6 7 8 9 10 11 12
<?php

namespace app\admin\validate;

use think\Validate;

class User extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
13
//        'username' => 'require|length:6,18',
何书鹏 authored
14 15 16 17 18
    ];
    /**
     * 提示消息
     */
    protected $message = [
19
//        'username.length' => '用户名长度需为6-18位'
何书鹏 authored
20 21 22 23 24 25 26 27 28 29
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}