I want to attach a behavior to a validator defined in the rules() function of a form. I can not figure out how. If I do something like this
array('page', 'numerical', 'integerOnly' => true, 'min' => 1, 'message' => '{attribute} is invalid'
, 'behaviors' => array(
'error' => array( 'class' => 'CErrorBehavior'),
),
),
I get the following exception
Property "CNumberValidator.behaviors" is not defined.
Any ideas?