33 lines
662 B
PHP
33 lines
662 B
PHP
<?php
|
|
|
|
namespace common\components\user\models;
|
|
|
|
use Yii;
|
|
use yii\base\Model;
|
|
|
|
/**
|
|
* @property string $password
|
|
* @property string $passwordConfirm
|
|
*/
|
|
class UserPassword extends Model
|
|
{
|
|
public $password;
|
|
public $passwordConfirm;
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
[['password', 'passwordConfirm'], 'required'],
|
|
[['password', 'passwordConfirm'], 'string'],
|
|
];
|
|
}
|
|
|
|
public function attributeLabels(): array
|
|
{
|
|
return [
|
|
'password' => Yii::t('user', 'Пароль'),
|
|
'passwordConfirm' => Yii::t('user', 'Повторите пароль'),
|
|
];
|
|
}
|
|
}
|