Skip to content

Commit

Permalink
translate pasword confirmation in RecoveryForm.php
Browse files Browse the repository at this point in the history
  • Loading branch information
thyseus committed Apr 11, 2017
1 parent 2ee6122 commit 1962878
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions models/RecoveryForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class RecoveryForm extends Model
*/
public $password;

/**
* @var string
*/
public $password_confirmation;

/**
* @var Mailer
*/
Expand Down Expand Up @@ -65,6 +70,7 @@ public function attributeLabels()
return [
'email' => \Yii::t('user', 'Email'),
'password' => \Yii::t('user', 'Password'),
'password_confirmation' => \Yii::t('user', 'Password confirmation'),
];
}

Expand All @@ -89,6 +95,7 @@ public function rules()
'emailRequired' => ['email', 'required'],
'emailPattern' => ['email', 'email'],
'passwordRequired' => ['password', 'required'],
'newPasswordConfirmation' => ['password_confirmation', 'compare', 'compareAttribute' => 'password'],
'passwordLength' => ['password', 'string', 'max' => 72, 'min' => 6],
];
}
Expand Down

0 comments on commit 1962878

Please sign in to comment.