mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-04 03:19:38 +00:00
Fixed create net alias
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user