I want to use filter functions provided by PHP natively, such as filter_input_array, filter_input, or filter_var_array. what is your recommendation on this? like where should I declare these filters?
It will be very nice if I can somehow integrate this with rules() in Yii model since they are similar in context.
oh, I know how to write a custom validation method, but it takes only one parameter which is a value to one attribute while filter_var_array takes an array of attributes?
I’m not asking you to write me a piece of code, but I am asking if it is possible to integrate filter_var_array or filter_input_array with Yii?
Empty parameters could be just ignored, since they are set as NULL, as opposed to FALSE, when using filter_input_array. Thank you very much. That was exactly what I needed.