Skip to content

Commit

Permalink
Fixes validatorjs#1087 isEmail Special Character Check Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
menikhilpandey committed Oct 20, 2019
1 parent 2a80a4f commit 6798a25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/isFQDN.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export default function isFQDN(str, options) {
if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(tld)) {
return false;
}
const tldUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
if (!tldUtf8Part.test(tld)) {
return false;
}
}
for (let part, i = 0; i < parts.length; i++) {
part = parts[i];
Expand Down

0 comments on commit 6798a25

Please sign in to comment.