mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
fix the minLength validation
This commit is contained in:
parent
72120099b4
commit
c8f2715edc
@ -131,7 +131,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
||||
}
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
if (strlen(${{paramName}}) > {{minLength}}) {
|
||||
if (strlen(${{paramName}}) < {{minLength}}) {
|
||||
throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.');
|
||||
}
|
||||
{{/minLength}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user