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)); 

problem

please me ?

enter image description here

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

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -