Skip to content

Commit

Permalink
Fixed #541
Browse files Browse the repository at this point in the history
  • Loading branch information
retspen committed Apr 21, 2015
1 parent 29d4be0 commit 2d84170
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions networks/forms.py
Expand Up @@ -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:
Expand All @@ -35,7 +35,7 @@ def clean_subnet(self):
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:
Expand Down
2 changes: 1 addition & 1 deletion templates/networks.html
Expand Up @@ -120,7 +120,7 @@ <h4 class="modal-title">{% trans "Add New Network" %}</h4>

<div class="col-sm-6">
<input type="text" class="form-control" name="bridge_name" placeholder="br0"
pattern="[a-z0-9\-_]+">
pattern="[a-z0-9\-_:]+">
</div>
</div>
<div class="form-group bridge_name_form_group">
Expand Down

0 comments on commit 2d84170

Please sign in to comment.