View Single Post
Old 10-06-2006, 03:16 PM   #1 (permalink)
3gg1
The Visitor
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
3gg1 is on a distinguished road
Default Form validation help

This is my php code:

PHP Code:
    if (!eregi ('^[[:alnum:]][A-Za-z0-9_.,-/ +-]{3,}$'stripslashes(trim($_POST['fMessage'])))) { 
It will be the validation code for a message field on a contact form. I want users to be able to type A-z,Ä,Å,Ö,ä,å,ö, and normal punctuation chars. I also want users to be able to do line breaks (press enter so they get to the next line on the same field). Other wise they will get an error message.

Thanks for help.

-3gg1
3gg1 is offline  
Reply With Quote