From 3cce2c9bd154415e7f85c68995374bdfc9207e50 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 1 Nov 2016 23:59:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81?= =?UTF-8?q?=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=20=D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/authentication/RecoverPasswordForm.php | 4 ++-- api/models/authentication/RegistrationForm.php | 4 ++-- api/models/profile/ChangePasswordForm.php | 4 ++-- .../{PasswordValidate.php => PasswordValidator.php} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename common/validators/{PasswordValidate.php => PasswordValidator.php} (86%) diff --git a/api/models/authentication/RecoverPasswordForm.php b/api/models/authentication/RecoverPasswordForm.php index 243638a..867268c 100644 --- a/api/models/authentication/RecoverPasswordForm.php +++ b/api/models/authentication/RecoverPasswordForm.php @@ -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'], ]); } diff --git a/api/models/authentication/RegistrationForm.php b/api/models/authentication/RegistrationForm.php index c85b518..dc4a723 100644 --- a/api/models/authentication/RegistrationForm.php +++ b/api/models/authentication/RegistrationForm.php @@ -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], diff --git a/api/models/profile/ChangePasswordForm.php b/api/models/profile/ChangePasswordForm.php index ecc7587..eb2332b 100644 --- a/api/models/profile/ChangePasswordForm.php +++ b/api/models/profile/ChangePasswordForm.php @@ -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], diff --git a/common/validators/PasswordValidate.php b/common/validators/PasswordValidator.php similarity index 86% rename from common/validators/PasswordValidate.php rename to common/validators/PasswordValidator.php index b4391f7..2b9c047 100644 --- a/common/validators/PasswordValidate.php +++ b/common/validators/PasswordValidator.php @@ -7,7 +7,7 @@ use yii\validators\StringValidator; /** * Класс должен реализовывать в себе все критерии валидации пароля пользователя */ -class PasswordValidate extends StringValidator { +class PasswordValidator extends StringValidator { public $min = 8;