[eluser]Kemik[/eluser]
Hello,
I'm building a comment form for my news articles and want to validate them. However the user will need to be able to post pretty much all characters bar html, php, anything that will change the layout, etc.
I believe PHP's strip_tags() function will remove any html and php from the string, but how would I add this to the validation? I cannot just add strip_tags to the end of my current rules can I?
E.g. $form->comment->rule = "trim|required|max_length[350]|xss_clean|string_tags";
Note, I'm using rapyd but that shouldn't make any difference to the validation, just the way I create forms.
Thanks.