henrik / validates_url_format_of

Validate the format of a URL by regexp in Ruby on Rails.
101 stars 32 forks source link

Regex failing to match the punycode url #9

Closed bv-sumit closed 5 years ago

bv-sumit commented 5 years ago

I was having the url which on converting to punycode has suffix as xn---- which the regex in the library fails to match. Example Url: "https://www.θεραπευτικη-κανναβη.com.gr" Punycode url: "https://www.xn----ylbbafnbqebomc7ba3bp1ds.com.gr"