Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(isFQDN): allow_numeric_tld option didn't work #1939

Merged

Conversation

BigOsvaap
Copy link
Contributor

According to the mentioned on this comment #1923 (comment)

Example: abc.efg.g1h. will always fail, current options don't provide this use case, but is valid

validator.isFQDN('abc.efg.g1h.', 
  { allow_trailing_dot: true, allow_underscores: true, allow_numeric_tld: true}); // false but should be true

the option allow_numeric_tld didn't work as supposed to do, this PR tries to fix that.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1939 (c605fe6) into master (c1b21a9) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1939   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2085      2085           
  Branches       472       472           
=========================================
  Hits          2085      2085           
Impacted Files Coverage Δ
src/lib/isFQDN.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1b21a9...c605fe6. Read the comment docs.

@rubiin rubiin merged commit 8f04ca9 into validatorjs:master Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants