<?php

namespace app\index\validate;

use think\Validate;

class UserValidate extends Validate
{
    protected $rule = array(
        'username'   => 'require|unique:user',
        'password'   => 'require',
        'repassword' => 'require|confirm:password'
    );
    protected $message = array(
        'username.require'    => '用户名必须',
        'username.unique'    => '用户名已存在',
        'password.require' => '密码必须',
        'repassword.require' => '确认密码必须',
        'repassword.confirm'    => '确认密码和密码必须一致',
    );
}