Expand|Select|Wrap|Line Numbers
- # 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