Can someone give me a point in the right direction with a javascript regular expression for validating a comment area for a contact form.
The basic alphanumeric one that came with the script I've got (mootools formcheck) is:
/^[a-z0-9 ._-]+$/i
But this is too strict, really - it won't allow most punctuation (not even commas)! Can someone give me something that will allow things like ? ! , : ; ( ) - but avoid things that aren't going to be needed in the field and pose risks, like $ _ < > [ ] { } etc?
Thanks for your help! I've been trying to figure this out for ages, but whenever I think I've got anywhere, I realise I've also let through a load of unwanted characters
The basic alphanumeric one that came with the script I've got (mootools formcheck) is:
/^[a-z0-9 ._-]+$/i
But this is too strict, really - it won't allow most punctuation (not even commas)! Can someone give me something that will allow things like ? ! , : ; ( ) - but avoid things that aren't going to be needed in the field and pose risks, like $ _ < > [ ] { } etc?
Thanks for your help! I've been trying to figure this out for ages, but whenever I think I've got anywhere, I realise I've also let through a load of unwanted characters
