Skip to content

Commit 1962878

Browse files
committed
translate pasword confirmation in RecoveryForm.php
1 parent 2ee6122 commit 1962878

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

models/RecoveryForm.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class RecoveryForm extends Model
3535
*/
3636
public $password;
3737

38+
/**
39+
* @var string
40+
*/
41+
public $password_confirmation;
42+
3843
/**
3944
* @var Mailer
4045
*/
@@ -65,6 +70,7 @@ public function attributeLabels()
6570
return [
6671
'email' => \Yii::t('user', 'Email'),
6772
'password' => \Yii::t('user', 'Password'),
73+
'password_confirmation' => \Yii::t('user', 'Password confirmation'),
6874
];
6975
}
7076

@@ -89,6 +95,7 @@ public function rules()
8995
'emailRequired' => ['email', 'required'],
9096
'emailPattern' => ['email', 'email'],
9197
'passwordRequired' => ['password', 'required'],
98+
'newPasswordConfirmation' => ['password_confirmation', 'compare', 'compareAttribute' => 'password'],
9299
'passwordLength' => ['password', 'string', 'max' => 72, 'min' => 6],
93100
];
94101
}

0 commit comments

Comments
 (0)