URLField validator regex does not allow valid domain name
|Reported by:||posta07||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.2|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.