vue-form-generator
vue-form-generator copied to clipboard
fix(validation): URL validation for URL(s) with more than four characters TLD
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:
Coverage remained the same at 89.979% when pulling 0eb342ea3f509d5eb88cff85adb1555fe77286a1 on ismail9k:master into 721a4eebbde77040a1318e60aa9ef21229bbcf99 on vue-generators:master.
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...
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.
Any update on this :), when this PR will be available on the release version?