Revision f5cd0730 flowspec/forms.py
b/flowspec/forms.py | ||
---|---|---|
151 | 151 |
|
152 | 152 |
def clean(self): |
153 | 153 |
if self.errors: |
154 |
raise forms.ValidationError(_('Errors in form. Please review and fix them'))
|
|
154 |
raise forms.ValidationError(_('Errors in form. Please review and fix them: %s'%", ".join(self.errors)))
|
|
155 | 155 |
name = self.cleaned_data.get('name', None) |
156 | 156 |
source = self.cleaned_data.get('source', None) |
157 | 157 |
sourceports = self.cleaned_data.get('sourceport', None) |
... | ... | |
269 | 269 |
try: |
270 | 270 |
p = int(port) |
271 | 271 |
if int(port) > 65535 or int(port) < 0: |
272 |
raise forms.ValidationError(_('')) |
|
272 |
raise forms.ValidationError(_('Port should be < 65535 and >= 0'))
|
|
273 | 273 |
return "%s" %self.cleaned_data["port"] |
274 | 274 |
except forms.ValidationError: |
275 | 275 |
raise forms.ValidationError(_('Port should be < 65535 and >= 0')) |
Also available in: Unified diff