Regex Validation for Textareas
Posted: Thu Aug 31, 2006 11:39 pm
Hello:
I'm writing a simple contact script that emails my customer's name, email and message. I'm wanting to use regular expressions to validate their input in the textarea, and am not sure how to write the expression. I want the user to be able to use all letters, numbers and basic punctuation, but nothing else.
I've used basic htmlentities validation in the past, but know there is something better with regexes.
Thank you,
Trevor
I'm writing a simple contact script that emails my customer's name, email and message. I'm wanting to use regular expressions to validate their input in the textarea, and am not sure how to write the expression. I want the user to be able to use all letters, numbers and basic punctuation, but nothing else.
I've used basic htmlentities validation in the past, but know there is something better with regexes.
Thank you,
Trevor