mirror of
https://github.com/elyby/accounts.git
synced 2024-12-02 11:41:05 +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 api\models\base\KeyConfirmationForm;
|
||||||
use common\helpers\Error as E;
|
use common\helpers\Error as E;
|
||||||
use common\models\EmailActivation;
|
use common\models\EmailActivation;
|
||||||
use common\validators\PasswordValidate;
|
use common\validators\PasswordValidator;
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\base\ErrorException;
|
use yii\base\ErrorException;
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class RecoverPasswordForm extends KeyConfirmationForm {
|
|||||||
return array_merge(parent::rules(), [
|
return array_merge(parent::rules(), [
|
||||||
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
|
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
|
||||||
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
|
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
|
||||||
['newPassword', PasswordValidate::class],
|
['newPassword', PasswordValidator::class],
|
||||||
['newRePassword', 'validatePasswordAndRePasswordMatch'],
|
['newRePassword', 'validatePasswordAndRePasswordMatch'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ use common\models\EmailActivation;
|
|||||||
use common\models\UsernameHistory;
|
use common\models\UsernameHistory;
|
||||||
use common\validators\EmailValidator;
|
use common\validators\EmailValidator;
|
||||||
use common\validators\LanguageValidator;
|
use common\validators\LanguageValidator;
|
||||||
use common\validators\PasswordValidate;
|
use common\validators\PasswordValidator;
|
||||||
use common\validators\UsernameValidator;
|
use common\validators\UsernameValidator;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
@ -47,7 +47,7 @@ class RegistrationForm extends ApiForm {
|
|||||||
|
|
||||||
['password', 'required', 'message' => E::PASSWORD_REQUIRED],
|
['password', 'required', 'message' => E::PASSWORD_REQUIRED],
|
||||||
['rePassword', 'required', 'message' => E::RE_PASSWORD_REQUIRED],
|
['rePassword', 'required', 'message' => E::RE_PASSWORD_REQUIRED],
|
||||||
['password', PasswordValidate::class],
|
['password', PasswordValidator::class],
|
||||||
['rePassword', 'validatePasswordAndRePasswordMatch'],
|
['rePassword', 'validatePasswordAndRePasswordMatch'],
|
||||||
|
|
||||||
['lang', LanguageValidator::class],
|
['lang', LanguageValidator::class],
|
||||||
|
@ -5,7 +5,7 @@ use api\models\base\ApiForm;
|
|||||||
use api\validators\PasswordRequiredValidator;
|
use api\validators\PasswordRequiredValidator;
|
||||||
use common\helpers\Error as E;
|
use common\helpers\Error as E;
|
||||||
use common\models\Account;
|
use common\models\Account;
|
||||||
use common\validators\PasswordValidate;
|
use common\validators\PasswordValidator;
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\base\ErrorException;
|
use yii\base\ErrorException;
|
||||||
use yii\helpers\ArrayHelper;
|
use yii\helpers\ArrayHelper;
|
||||||
@ -37,7 +37,7 @@ class ChangePasswordForm extends ApiForm {
|
|||||||
return ArrayHelper::merge(parent::rules(), [
|
return ArrayHelper::merge(parent::rules(), [
|
||||||
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
|
['newPassword', 'required', 'message' => E::NEW_PASSWORD_REQUIRED],
|
||||||
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
|
['newRePassword', 'required', 'message' => E::NEW_RE_PASSWORD_REQUIRED],
|
||||||
['newPassword', PasswordValidate::class],
|
['newPassword', PasswordValidator::class],
|
||||||
['newRePassword', 'validatePasswordAndRePasswordMatch'],
|
['newRePassword', 'validatePasswordAndRePasswordMatch'],
|
||||||
['logoutAll', 'boolean'],
|
['logoutAll', 'boolean'],
|
||||||
['password', PasswordRequiredValidator::class, 'account' => $this->_account],
|
['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;
|
public $min = 8;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user