I have a model with validation rule like this
public function rules()
{
return array(
array('oldPassword,newPassword', 'required'),
array('newPassword','length','max'=>64, 'min'=>6),
array('newPassword', 'compare', 'compareAttribute' => 'confirmPassword'),
array('confirmPassword', 'safe'),
);
}
I want to use this same model for two different forms. In one form oldPassword validation is required & in the other not required. is this possible?
Did you mind reading the guide? if you still dont get it after that there is a wiki about it
Please try to do some research before posting a question