python: Fix model maxLength validation error message

This commit is contained in:
Ville Skyttä
2016-09-06 14:49:00 +03:00
parent ddc5b80438
commit f436f0eee2
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class {{classname}}(object):
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
{{#maxLength}}
if len({{name}}) > {{maxLength}}:
raise ValueError("Invalid value for `{{name}}`, length must be less than `{{maxLength}}`")
raise ValueError("Invalid value for `{{name}}`, length must be less than or equal to `{{maxLength}}`")
{{/maxLength}}
{{#minLength}}
if len({{name}}) < {{minLength}}: