Custom Validator Not Working

Hi,

I made a custom validator and follow is the array i added in model’s rule,


array('item_bid_end','ext.StringDateValidator.StringDateValidator','compareAttribute'=>'item_bid_start','operator'=>'>', 'allowEmpty'=>false, 'on'=>'create'),

it isn’t work when there is [color="#FF0000"]‘on’=>‘create’ [/color] element (Even doesn’t go in to the validator), but when i remove it like,


array('item_bid_end','ext.StringDateValidator.StringDateValidator','compareAttribute'=>'item_bid_start','operator'=>'>', 'allowEmpty'=>false),

Then it works…

can someone help to make the validation with on… :(

Do you have a ‘create’ scenario of your own or you wanted to use the default ‘insert’ one?

in action create do:


$model= new ModelClass('create');