<?php
namespace app\admin\validate\index;

use think\Validate;

class LoginValidate extends Validate
{
    //定义规则
    protected $rule =   [
        'user_name' => 'require',
        'password'  => 'require',
    ];

    //定义描述
    protected $message  =   [
        'user_name.require' => '登录账号不能为空',
        'password.require'  => '登录密码不能为空'
    ];

    //定义场景
    protected $scene = [
        'login_admin' => ['user_name','password'],
    ];
}
