|
@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
use yii\base\Model; |
|
|
use yii\base\Model; |
|
|
use yii\validators\Validator; |
|
|
use yii\validators\Validator; |
|
|
|
|
|
use Wiggins\MyProject\MyValidator; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* UserInput类是用于用户登录或注册场景中输入数据 |
|
|
* UserInput类是用于用户登录或注册场景中输入数据 |
|
@ -69,6 +70,7 @@ |
|
|
['pwdConfirm','compare','compareAttribute'=>'password','message'=>'两次密码必须一致'], |
|
|
['pwdConfirm','compare','compareAttribute'=>'password','message'=>'两次密码必须一致'], |
|
|
[['name','email','password','pwdConfirm'],'required','on'=>'register'], |
|
|
[['name','email','password','pwdConfirm'],'required','on'=>'register'], |
|
|
[['name','password'],'required','on'=>'login'], |
|
|
[['name','password'],'required','on'=>'login'], |
|
|
|
|
|
[['name'],'Wiggins\MyProject\MyValidator'], |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|