Hello, im posting this question because i have zero knowledge on javascrip. I have a script which curently allows users to imput an email address and if the email is not valid it wont allow the submission. Everything works fine except that now there are clients who have a period in their email address and it is rejected. eg. tom.jones@email .com.. im sure its a simple addition to the script not even sure where it might go but here is what i copied and where im assuming it might need to be changed..
i appreciate any help
thanks
EMI
Code:
# Do our error checking
my $gintErrorCount = 0;
my $gstrMessage = "";
# Email Address
unless ($gstrHash{email} =~ m/^(\w+)\@(\w+)\.(\w{2,4})$/) {$gintErrorCount ++; $gstrMessage .= "Your email address is not properly formatted.<BR>";}
# Fix phone variable - client
$gstrHash{cphone} =~ s/\D//g;
unless ($gstrHash{cphone} =~ m/^\d{10}$/) {$gintErrorCount ++; $gstrMessage .= "Your contact phone number must be a ten digit number.<BR>";}
$gstrHash{cphone} =~ s/^([\d]{3}?)([\d]{3}?)([\d]{4}?)$/\($1\)$2-$3/i;
# Email Address
unless ($gstrHash{cemail} =~ m/^(\w+)\@(\w+)\.(\w{2,4})$/) {$gintErrorCount ++; $gstrMessage .= "Your contact email address is not properly formatted.<BR>";}
thanks
EMI
Comment