forked from loafle/openapi-generator-original
python: Fix model maxLength validation error message
This commit is contained in:
parent
ddc5b80438
commit
f436f0eee2
@ -74,7 +74,7 @@ class {{classname}}(object):
|
|||||||
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
|
||||||
{{#maxLength}}
|
{{#maxLength}}
|
||||||
if len({{name}}) > {{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}}
|
{{/maxLength}}
|
||||||
{{#minLength}}
|
{{#minLength}}
|
||||||
if len({{name}}) < {{minLength}}:
|
if len({{name}}) < {{minLength}}:
|
||||||
|
@ -428,7 +428,7 @@ class FormatTest(object):
|
|||||||
if not password:
|
if not password:
|
||||||
raise ValueError("Invalid value for `password`, must not be `None`")
|
raise ValueError("Invalid value for `password`, must not be `None`")
|
||||||
if len(password) > 64:
|
if len(password) > 64:
|
||||||
raise ValueError("Invalid value for `password`, length must be less than `64`")
|
raise ValueError("Invalid value for `password`, length must be less than or equal to `64`")
|
||||||
if len(password) < 10:
|
if len(password) < 10:
|
||||||
raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`")
|
raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user