ansman/validate.js

BUG: Leading "Thin Space" Unicode Character (U+2009) is valid email

Opened this issue · 0 comments

// EXPECTED: Control/normal email
validate.single("example@email.test", { email: true });
// => undefined

// EXPECTED: Use spacebar space
validate.single(" example@email.test", { email: true });
// => [ 'is not a valid email' ]

// UNEXPECTED: Use "Thin Space" Unicode Character (U+2009)
validate.single(" example@email.test", { email: true });
// => undefined