diff --git a/apps/advanced/common/models/LoginForm.php b/apps/advanced/common/models/LoginForm.php index 795c378ed6..30fb39b220 100644 --- a/apps/advanced/common/models/LoginForm.php +++ b/apps/advanced/common/models/LoginForm.php @@ -23,9 +23,9 @@ class LoginForm extends Model // username and password are both required [['username', 'password'], 'required'], // password is validated by validatePassword() - [['password'], 'validatePassword'], + ['password', 'validatePassword'], // rememberMe must be a boolean value - [['rememberMe'], 'boolean'], + ['rememberMe', 'boolean'], ]; } diff --git a/apps/advanced/common/models/User.php b/apps/advanced/common/models/User.php index 85e55390c3..17bd630798 100644 --- a/apps/advanced/common/models/User.php +++ b/apps/advanced/common/models/User.php @@ -104,18 +104,18 @@ class User extends ActiveRecord implements IdentityInterface public function rules() { return [ - [['username'], 'filter', 'filter' => 'trim'], - [['username'], 'required'], - [['username'], 'string', 'min' => 2, 'max' => 255], + ['username', 'filter', 'filter' => 'trim'], + ['username', 'required'], + ['username', 'string', 'min' => 2, 'max' => 255], - [['email'], 'filter', 'filter' => 'trim'], - [['email'], 'required'], - [['email'], 'email'], - [['email'], 'unique', 'message' => 'This email address has already been taken.', 'on' => 'signup'], - [['email'], 'exist', 'message' => 'There is no user with such email.', 'on' => 'requestPasswordResetToken'], + ['email', 'filter', 'filter' => 'trim'], + ['email', 'required'], + ['email', 'email'], + ['email', 'unique', 'message' => 'This email address has already been taken.', 'on' => 'signup'], + ['email', 'exist', 'message' => 'There is no user with such email.', 'on' => 'requestPasswordResetToken'], - [['password'], 'required'], - [['password'], 'string', 'min' => 6], + ['password', 'required'], + ['password', 'string', 'min' => 6], ]; } diff --git a/apps/advanced/frontend/models/ContactForm.php b/apps/advanced/frontend/models/ContactForm.php index 45b0da0d24..0a664ad1ca 100644 --- a/apps/advanced/frontend/models/ContactForm.php +++ b/apps/advanced/frontend/models/ContactForm.php @@ -25,9 +25,9 @@ class ContactForm extends Model // name, email, subject and body are required [['name', 'email', 'subject', 'body'], 'required'], // email has to be a valid email address - [['email'], 'email'], + ['email', 'email'], // verifyCode needs to be entered correctly - [['verifyCode'], 'captcha'], + ['verifyCode', 'captcha'], ]; } diff --git a/apps/basic/models/ContactForm.php b/apps/basic/models/ContactForm.php index dbdde8b0a5..13445627ee 100644 --- a/apps/basic/models/ContactForm.php +++ b/apps/basic/models/ContactForm.php @@ -25,9 +25,9 @@ class ContactForm extends Model // name, email, subject and body are required [['name', 'email', 'subject', 'body'], 'required'], // email has to be a valid email address - [['email'], 'email'], + ['email', 'email'], // verifyCode needs to be entered correctly - [['verifyCode'], 'captcha'], + ['verifyCode', 'captcha'], ]; } diff --git a/apps/basic/models/LoginForm.php b/apps/basic/models/LoginForm.php index cdff17b61c..ad854a29ec 100644 --- a/apps/basic/models/LoginForm.php +++ b/apps/basic/models/LoginForm.php @@ -23,9 +23,9 @@ class LoginForm extends Model // username and password are both required [['username', 'password'], 'required'], // password is validated by validatePassword() - [['password'], 'validatePassword'], + ['password', 'validatePassword'], // rememberMe must be a boolean value - [['rememberMe'], 'boolean'], + ['rememberMe', 'boolean'], ]; }