From 6bf7e309c6405adf745623ae4ab51b136c67d602 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 13 Mar 2017 17:32:38 +0100 Subject: [PATCH] make a regexp to valid domain --- tiramisu/option/option.py | 54 +++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/tiramisu/option/option.py b/tiramisu/option/option.py index 600cf2a..619b2c0 100644 --- a/tiramisu/option/option.py +++ b/tiramisu/option/option.py @@ -465,7 +465,21 @@ class DomainnameOption(Option): raise ValueError(_('allow_without_dot must be a boolean')) extra['_allow_ip'] = allow_ip extra['_allow_without_dot'] = allow_without_dot - extra['_domain_re'] = re.compile(r'^[a-z\d][a-z\d\-]*$') + # FIXME should be + # regexp = r'^((?!-)[a-z0-9-]{1,63}(?