diff --git a/interfaces/forms.py b/interfaces/forms.py index cebd8a9..e7c22bf 100644 --- a/interfaces/forms.py +++ b/interfaces/forms.py @@ -65,7 +65,7 @@ class AddInterface(forms.Form): def clean_netdev(self): netdev = self.cleaned_data['netdev'] - have_symbol = re.match('^[a-z0-9.]+$', netdev) + have_symbol = re.match('^[a-z0-9.:]+$', netdev) if not have_symbol: raise forms.ValidationError(_('The interface must not contain any special characters')) elif len(netdev) > 10: diff --git a/networks/forms.py b/networks/forms.py index 3d44433..fc94358 100644 --- a/networks/forms.py +++ b/networks/forms.py @@ -16,7 +16,7 @@ class AddNetPool(forms.Form): def clean_name(self): name = self.cleaned_data['name'] - have_symbol = re.match('^[a-zA-Z0-9._-]+$', name) + have_symbol = re.match('^[a-zA-Z0-9\.\_\-]+$', name) if not have_symbol: raise forms.ValidationError(_('The pool name must not contain any special characters')) elif len(name) > 20: @@ -35,7 +35,7 @@ class AddNetPool(forms.Form): def clean_bridge_name(self): bridge_name = self.cleaned_data['bridge_name'] if self.cleaned_data['forward'] == 'bridge': - have_symbol = re.match('^[a-zA-Z0-9._-]+$', bridge_name) + have_symbol = re.match('^[a-zA-Z0-9\.\_\:\-]+$', bridge_name) if not have_symbol: raise forms.ValidationError(_('The pool bridge name must not contain any special characters')) elif len(bridge_name) > 20: diff --git a/networks/templates/create_net_block.html b/networks/templates/create_net_block.html index 0ab42b4..166dc23 100644 --- a/networks/templates/create_net_block.html +++ b/networks/templates/create_net_block.html @@ -52,7 +52,7 @@
- +