Cfiltervalidator Fires Twice (During Validation And Save)

Hello! I’m trying to use my own filter in model. Here is a validation rule:




        'filter' => array(




        'on' => 'profile'


MyFilter is a class name, filterText is a filter method. This method clean up text (using CHtmlPurifier) and wrap it in "p" tags (by new lines \n).

The problem is that text is became filtered twice: first when validate method is fired and second when save method is fired. So I get something like this:






Instead of this:





Maybe there are ways to disable filter at save method?

If the model is already validated that there is no need to validate it again on save so use save(‘false’) -

Thank you! It solved the problem.