From f6d9e45b520ce37c57c78a8c0512087fc13c0a8a Mon Sep 17 00:00:00 2001 From: Stan Lagun Date: Thu, 30 May 2013 20:53:51 +0400 Subject: [PATCH] Changed domain name validation regexp Change-Id: I3f5c3d9c22c6bd9f6c523c169451ab96c277be54 --- muranodashboard/panel/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/muranodashboard/panel/forms.py b/muranodashboard/panel/forms.py index 865d2b2d5..87903288a 100644 --- a/muranodashboard/panel/forms.py +++ b/muranodashboard/panel/forms.py @@ -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'),