Opened 10 years ago

Closed 10 years ago

#11562 closed (invalid)

Error in regular exression for EmailField validation

Reported by: HuCy Owned by: nobody
Component: Forms Version: master
Severity: Keywords: emailfield
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


As RFC 1035 states:

The labels must follow the rules for ARPANET host names. They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen. There are also some
restrictions on the length. Labels must be 63 characters or less.

Though the regular expression allows domainnames to begin with a hyphen.

Change History (1)

comment:1 Changed 10 years ago by Karen Tracey

Resolution: invalid
Status: newclosed

r10573 fixed the regex to disallow hyphens except in the interior of a label, and that changeset includes tests that verify that email addresses with domain names beginning with a hyphen do not validate. If there is really still a problem, please reopen with more specifics on exactly what invalid email address, for example, you still observe passing validation with current code in SVN.

Note: See TracTickets for help on using tickets.
Back to Top