Переименован класс валидатора пароля

This commit is contained in:
ErickSkrauch 2016-11-01 23:59:43 +03:00
parent 91df81f97d
commit 3cce2c9bd1
4 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ use api\models\AccountIdentity;
use api\models\base\KeyConfirmationForm;
use common\helpers\Error as E;
use common\models\EmailActivation;
use common\validators\PasswordValidate;
use common\validators\PasswordValidator;
use Yii;
use yii\base\ErrorException;
@ -19,7 +19,7 @@ class RecoverPasswordForm extends KeyConfirmationForm {
return array_merge(parent::rules(), [
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
['newPassword', PasswordValidate::class],
['newPassword', PasswordValidator::class],
['newRePassword', 'validatePasswordAndRePasswordMatch'],
]);
}

View File

@ -11,7 +11,7 @@ use common\models\EmailActivation;
use common\models\UsernameHistory;
use common\validators\EmailValidator;
use common\validators\LanguageValidator;
use common\validators\PasswordValidate;
use common\validators\PasswordValidator;
use common\validators\UsernameValidator;
use Exception;
use Ramsey\Uuid\Uuid;
@ -47,7 +47,7 @@ class RegistrationForm extends ApiForm {
['password', 'required', 'message' => E::PASSWORD_REQUIRED],
['rePassword', 'required', 'message' => E::RE_PASSWORD_REQUIRED],
['password', PasswordValidate::class],
['password', PasswordValidator::class],
['rePassword', 'validatePasswordAndRePasswordMatch'],
['lang', LanguageValidator::class],

View File

@ -5,7 +5,7 @@ use api\models\base\ApiForm;
use api\validators\PasswordRequiredValidator;
use common\helpers\Error as E;
use common\models\Account;
use common\validators\PasswordValidate;
use common\validators\PasswordValidator;
use Yii;
use yii\base\ErrorException;
use yii\helpers\ArrayHelper;
@ -37,7 +37,7 @@ class ChangePasswordForm extends ApiForm {
return ArrayHelper::merge(parent::rules(), [
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
['newPassword', PasswordValidate::class],
['newPassword', PasswordValidator::class],
['newRePassword', 'validatePasswordAndRePasswordMatch'],
['logoutAll', 'boolean'],
['password', PasswordRequiredValidator::class, 'account' => $this->_account],

View File

@ -7,7 +7,7 @@ use yii\validators\StringValidator;
/**
* Класс должен реализовывать в себе все критерии валидации пароля пользователя
*/
class PasswordValidate extends StringValidator {
class PasswordValidator extends StringValidator {
public $min = 8;