Page 1 of 1
Message Validator
Posted: Sun Nov 30, 2008 2:57 pm
by schneina
I'm allowing users to post messages on my site but there are certain things I want to look for in the message:
E-mail address
Phone numbers
Addresses
Curse words
Does anyone know of such an API or function calls to accomplish this task?
Re: Message Validator
Posted: Mon Dec 01, 2008 6:10 am
by maneetpuri
Hi,
I am not sure if there is any API available for it, but its very simple and you can code it. You will have to design a form with these fields, which when submitted will be stored in the database and on the message board pick this from the database and display them
Hope this helps.
Cheers,
~Maneet
Re: Message Validator
Posted: Wed Dec 24, 2008 12:53 pm
by schneina
What I'm actually looking for is something that checks for these things and throws an error if these things exist in a message.
Does this help?
Re: Message Validator
Posted: Wed Dec 24, 2008 1:21 pm
by The_Anomaly
I'm sure it'd be pretty slow, but I'm sure you can use some regex and string functions to check for it all. Check out the preg_* and str* functions, and learn some regex.