html5 - Constraint Validation API for input type="email"? -
using html5 constraint validation api validating form field type="email"
, noticed chrome accepts "aa@a" right email address. what's purpose of - bug? bad practice define custom pattern?
what's purpose of this
to not exclude valid email addresses.
is bug
no. here definition of valid email address html5 compliant browsers should use. there open defect against definition, if fixed aa@a
still validly formatted email address. remember email first came in mid-sixties, didn't dns until mid-eightes, lots of 'right side of @' things little unusual valid in these older contexts.
is bad practice define custom pattern?
certainly if requirements more strict 'all validly formatted email addresses' could, email validation easy thing wrong, all new top level domains coming online year. if you're concerned valid email addresses (as opposed validly formatted email addresses) solution send actual email address , confirm arrives (through sort of token based confirmation url user has click on).
html5 forms validation constraints
No comments:
Post a Comment