mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
Переименован класс валидатора пароля
This commit is contained in:
parent
91df81f97d
commit
3cce2c9bd1
@ -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'],
|
||||
]);
|
||||
}
|
||||
|
@ -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],
|
||||
|
@ -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],
|
||||
|
@ -7,7 +7,7 @@ use yii\validators\StringValidator;
|
||||
/**
|
||||
* Класс должен реализовывать в себе все критерии валидации пароля пользователя
|
||||
*/
|
||||
class PasswordValidate extends StringValidator {
|
||||
class PasswordValidator extends StringValidator {
|
||||
|
||||
public $min = 8;
|
||||
|
Loading…
Reference in New Issue
Block a user