I was confusing where should i do purify between controller and models, when i was having some input, should i do purify in controller and pass variable to models or i gonna apply purify only in the models? Can anyone suggest me the good way to using Yii purify?
All my input was using CHtml input field as input, not using model(), so i am not able to use the validation "rule" right? The purify i have tried and i work fine, i just not very sure doing purify at controller is the best way or doing purify in models.
If you collect some user data, you can create a model class (extending CFormModel) with validation rules. It will be the true “Yii way” But if you don’t have a model, then why do you ask? You can use it anywhere, but usually it’s a model’s business.