vue-form-generator icon indicating copy to clipboard operation
vue-form-generator copied to clipboard

fix(validation): URL validation for URL(s) with more than four characters TLD

Open ismail9k opened this issue 5 years ago • 4 comments
trafficstars

This PR is mainly to fix URL validation for URL(s) with more than four characters TLD (e.g. .store, .online, .studio, .design, .international ...)

  • Please check if the PR fulfills these requirements
  • [x] The commit message follows our guidelines
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Bug fix
  • What is the current behavior? (You can also link to an open issue here) It gives invalid URL message for URLs five-plus characters TLD (example this website https://mycatalog.store/)
  • What is the new behavior (if this is a feature change)? URLs with more than four characters TLD should tread as a valid URLs.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?) No breaking change
  • Other information:

ismail9k avatar Apr 27 '20 20:04 ismail9k

Coverage Status

Coverage remained the same at 89.979% when pulling 0eb342ea3f509d5eb88cff85adb1555fe77286a1 on ismail9k:master into 721a4eebbde77040a1318e60aa9ef21229bbcf99 on vue-generators:master.

coveralls avatar Apr 27 '20 20:04 coveralls

If we’re going to fix this, should address the fact that TLD’s do not have a length limit... to my knowledge. There are some fairly large ones. I believe “business” is a TLD now for example.

The TLD should be validated if it contains valid chars, regardless of length...

zoul0813 avatar Apr 27 '20 21:04 zoul0813

Yes, we should support all the currently available TLDs. However, I have searched for the list of available TLD, the characters count vary from 2 to around 24 characters. So, I suggest validating TLD to be a minimum of 2 characters without maximum.

ismail9k avatar Apr 28 '20 08:04 ismail9k

Any update on this :), when this PR will be available on the release version?

ismail9k avatar Dec 04 '20 06:12 ismail9k