fix(isFQDN): allow_numeric_tld option didn't work by BigOsvaap · Pull Request #1939 · validatorjs/validator.js

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)