forked from loafle/openapi-generator-original
fix the minLength validation
This commit is contained in:
parent
72120099b4
commit
c8f2715edc
@ -131,7 +131,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
}
|
}
|
||||||
{{/maxLength}}
|
{{/maxLength}}
|
||||||
{{#minLength}}
|
{{#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}}.');
|
throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.');
|
||||||
}
|
}
|
||||||
{{/minLength}}
|
{{/minLength}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user