模型对象为
UserChangePassword Object
(
[oldPassword] =>
[password] =>
[verifyPassword] =>
[_errors:CModel:private] => Array
(
)
[_validators:CModel:private] =>
[_scenario:CModel:private] => change
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
模型规则是
array('oldPassword, password, verifyPassword', 'required','on' => 'change'),
array('oldPassword, password, verifyPassword', 'length', 'max'=>128, 'min' => 4,'on' => 'change','message' => Yii::t('recovery',"Incorrect password (minimal length 4 symbols).")),
array('verifyPassword', 'compare', 'compareAttribute'=>'password','on' => 'change','message' => Yii::t('recovery',"Retype Password is incorrect.")),
array('oldPassword', 'verifyOldPassword','on' => 'change'),
控制器创建模型为
$passwordForm = new UserChangePassword('change');
$this->renderPartial('_password', array('form' => $passwordForm));
请帮我 ?