VinaiKopp_CategoryLink
VinaiKopp_CategoryLink copied to clipboard
Incorrect URL validation
Hi, I needed to add an URL in the following format: "http://example.com/value-value/" but it only worked if I usea sub-domain: "http://sub.example.com/value-value/".
I changed the RegEx for URL validation to the following one:
'/^(http|https|ftp):\\/\\/[a-z0-9_]+([\\-\\.]{1}[a-z_0-9]+)*\\.[_a-z]{2,5}'.'((:[0-9]{1,5})?\\/.*)?$/i'
and it seems to work in all cases.
Hope it helps.