View Single Post
  #21  
Old 10-18-2005, 03:00 PM
 
Loon Loon is offline
 

Member
  
Join Date: Feb 2004
Location: MN, USA
Posts: 19
 

Default

We've had several problems with the regular expression that checks if the email is valid --
I changed in skin1/check_email_script.tpl and skin1/check_gcemail_script.tpl, this line:
New Code to replace old:
Code:
var goodEmail = field.value.search(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/gi);

The first reiteration of this check would not allow someone with a 2 character email to register (invalid email address for ed@somewhere.net)

I tweaked it a little and then heard from a customer on RedHat Linux, Netscape 7.1, that it wouldn't allow her to register AND no error - the submit button just didn't do anything. I loaded up the browser on Fedora and sure enough, there was a javascript error. It worked fine in Netscape 7.1 on a Windows box ... weird.

Anyway, the above will allow a 1 character email name, a 1 character domain (a.com if it existed) and ed@somewhere.ca can now register.

Give yours a try on Linux with Netscape 7.1 if you can, or try to create a profile using a two character user name ... you may have the same problem.
__________________
Linux / Apache 1.3.31
PHP 4.3.3
MySQL 4.0.18
X-Cart 3.5.4 in production Mar 08, 2004
X-Cart 3.5.4 Win2k SP4 for development
Reply With Quote