Opened 7 years ago

Closed 7 years ago

#15014 closed (duplicate)

URLField validator regex does not allow valid domain name

Reported by: posta07 Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


For internal urls that I would like to enter into an URLField, I found that the regex that the validator uses flags the url as incorrect even though it is a valid URL.

For exmaple, http://servername/context/context/etc/ is flagged as incorrect. After reviewing the regex that's being used, it appears it's expecting a .com or .biz or some kind of extension.

Here is the regex related to testing for the 'domain':


As you can see, it expects a period character in the domain name followed by a 2-6 character length extension.

Change History (1)

comment:1 Changed 7 years ago by Russell Keith-Magee

Resolution: duplicate
Status: newclosed

Duplicate of #9202.

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