View Single Post
  #19  
Old 08-19-2008, 12:19 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
Still the man
But when you enter www.mydomain.com/shop it is also accepted

The answer is
Code:
var re = new RegExp(/^(http:\/\/)?[^\.\/]+\.[^\.\/]+\.[^\.\/]+$/i);

If you would like to know how it works, follow this link.
http://www.webreference.com/js/column5/
__________________
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