Proper case for error messages.

pull/7/head
Ferry Boender 10 years ago
parent 63c3a4d594
commit 0b3aeaca41
  1. 6
      src/formdefinition.py

@ -202,10 +202,10 @@ class FormDefinition(object):
maxlen = field_def.get('maxlen', None) maxlen = field_def.get('maxlen', None)
if minlen is not None and len(value) < int(minlen): if minlen is not None and len(value) < int(minlen):
raise ValidationError("minimum length is {0}".format(minlen)) raise ValidationError("Minimum length is {0}".format(minlen))
if maxlen is not None and len(value) > int(maxlen): if maxlen is not None and len(value) > int(maxlen):
raise ValidationError("maximum length is {0}".format(maxlen)) raise ValidationError("Maximum length is {0}".format(maxlen))
return value return value
@ -217,7 +217,7 @@ class FormDefinition(object):
minlen = field_def.get('minlen', None) minlen = field_def.get('minlen', None)
if minlen is not None and len(value) < int(minlen): if minlen is not None and len(value) < int(minlen):
raise ValidationError("minimum length is {0}".format(minlen)) raise ValidationError("Minimum length is {0}".format(minlen))
return value return value

Loading…
Cancel
Save