Changed domain name validation regexp

Change-Id: I3f5c3d9c22c6bd9f6c523c169451ab96c277be54
This commit is contained in:
Stan Lagun 2013-05-30 20:53:51 +04:00
parent 30cd60782e
commit f6d9e45b52
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ class CommonPropertiesExtension(object):
class WizardFormADConfiguration(forms.Form, CommonPropertiesExtension):
domain_name_re = re.compile(r'^[a-zA-Z0-9-]+$')
domain_name_re = re.compile(
r'^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$')
validate_domain_name = RegexValidator(domain_name_re,
_(u'Enter a valid \
Standard DNS domain name'),