View Single Post
  #13  
Old 08-18-2008, 09:36 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Validation script to check if custom text field has been filled

Quote:
Originally Posted by Warwick
You're the man!
I wish it were so, but i forgot about slashes.
So "domain.com/page.php" will pass this test.

so it would be better replace
Code:
var re = new RegExp(/^(http:\/\/)?[^\.]+\.[^\.]+\.[^\.]+$/i);

with
Code:
var re = new RegExp(/^(http:\/\/)?[^\.\/]+\.[^\.\/]+\.[^\.]+$/i);
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote