Hi all,
I've noticed on a number of occasions that PROTX cannot proceed because customers have entered an invalid e-mail address - most of the time it is because the customer has entered a comma in place of a full-stop (or 'dot' if you prefer).
Now I know that there is some e-mail address validation in the OrderScript.pl script which contains the following line:
$::g_BillContact{'EMAIL'} !~ /\@/) # and it is not in the expected format
I'm not a pearl person, so at a guess I think this line is making sure a @ sign exists.
Are there any pearl experts out there who could help to enhance this code to look for an e-mail in the format xxx@xxx.xxx where x is any valid character (a-z, 1-0, ".", "-")?
Thanks
Raj
P.S. I know it is possible to do some validation in Javascript, but I wanted to adapt the pearl script so that an error is reported to the customer in the standard actinic way.
I've noticed on a number of occasions that PROTX cannot proceed because customers have entered an invalid e-mail address - most of the time it is because the customer has entered a comma in place of a full-stop (or 'dot' if you prefer).
Now I know that there is some e-mail address validation in the OrderScript.pl script which contains the following line:
$::g_BillContact{'EMAIL'} !~ /\@/) # and it is not in the expected format
I'm not a pearl person, so at a guess I think this line is making sure a @ sign exists.
Are there any pearl experts out there who could help to enhance this code to look for an e-mail in the format xxx@xxx.xxx where x is any valid character (a-z, 1-0, ".", "-")?
Thanks
Raj
P.S. I know it is possible to do some validation in Javascript, but I wanted to adapt the pearl script so that an error is reported to the customer in the standard actinic way.
Comment