Does anybody know of a good Jquery solution to checking for swear words when a form is submitted?
Basically I have a form which submits to Twitter, upon successfully passing a swear word check it will submit via ajax. I know how to do it in PHP (for non javascript enabled users), I did a foreach loop through an array of predefined bad words and checked them against what was submitted.
How would I do a similar thing with Jquery?
Thanks
I think it would be more practical to do that on the server side. Once your PHP script has checked/filtered the input then PHP submits to twitter. That also guarantees that guys with Javascript switched off cannot post any obscenities (client-side validation should always be backed up by server-side validation).