12345678910111213141516171819202122232425262728 |
- <?php
- // +----------------------------------------------------------------------
- // | snake
- // +----------------------------------------------------------------------
- // | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- // +----------------------------------------------------------------------
- // | Author: NickBai <1902822973@qq.com>
- // +----------------------------------------------------------------------
- namespace app\index\validate;
- use think\Validate;
- class UserValidate extends Validate
- {
- protected $rule = array(
- 'user_name' => 'require|unique:user',
- 'password' => 'require',
- 'repassword' => 'require|confirm:password'
- );
- protected $message = array(
- 'user_name.require' => '用户名必须',
- 'user_name.unique' => '用户名已存在',
- 'password.require' => '密码必须',
- 'repassword.require' => '确认密码和密码必须一致',
- );
- }
|