php - scenario validation rules showing null -
model object
userchangepassword object ( [oldpassword] => [password] => [verifypassword] => [_errors:cmodel:private] => array ( ) [_validators:cmodel:private] => [_scenario:cmodel:private] => change [_e:ccomponent:private] => [_m:ccomponent:private] => ) model rules
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 incorrect.")), array('oldpassword', 'verifyoldpassword','on' => 'change'), controller create model
$passwordform = new userchangepassword('change'); $this->renderpartial('_password', array('form' => $passwordform)); 
please me ?

rules method has return array of validation rules. below:
public function rules() { return array( // validation rules go here ); } if doesn't (array declared , return keyword missed) - can cause problem.
Comments
Post a Comment