Opened 15 years ago
Closed 15 years ago
#11562 closed (invalid)
Error in regular exression for EmailField validation
Reported by: | HuCy | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
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 |
Description
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.
Note:
See TracTickets
for help on using tickets.
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.