All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java-micronaut-client.params.beanValidation.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{#useBeanValidation}}{{!
validate all pojos and enums
}}{{^isContainer}}{{#isModel}}@Valid {{/isModel}}{{/isContainer}}{{!
nullable & nonnull
}}{{#required}}@NotNull {{/required}}{{#isNullable}}@Nullable {{/isNullable}}{{!
pattern
}}{{#pattern}}{{^isByteArray}}@Pattern(regexp="{{{pattern}}}") {{/isByteArray}}{{/pattern}}{{!
both minLength && maxLength
}}{{#minLength}}{{#maxLength}}@Size(min={{minLength}}, max={{maxLength}}) {{/maxLength}}{{/minLength}}{{!
just minLength
}}{{#minLength}}{{^maxLength}}@Size(min={{minLength}}) {{/maxLength}}{{/minLength}}{{!
just maxLength
}}{{^minLength}}{{#maxLength}}@Size(max={{maxLength}}) {{/maxLength}}{{/minLength}}{{!
@Size: both minItems && maxItems
}}{{#minItems}}{{#maxItems}}@Size(min={{minItems}}, max={{maxItems}}) {{/maxItems}}{{/minItems}}{{!
@Size: just minItems
}}{{#minItems}}{{^maxItems}}@Size(min={{minItems}}) {{/maxItems}}{{/minItems}}{{!
@Size: just maxItems
}}{{^minItems}}{{#maxItems}}@Size(max={{maxItems}}) {{/maxItems}}{{/minItems}}{{!
@Email
}}{{#isEmail}}@Email{{/isEmail}}{{!
check for integer or long / all others=decimal type with @Decimal*
isInteger set
}}{{#isInteger}}{{#minimum}}@Min({{minimum}}) {{/minimum}}{{#maximum}}@Max({{maximum}}) {{/maximum}}{{/isInteger}}{{!
isLong set
}}{{#isLong}}{{#minimum}}@Min({{minimum}}L) {{/minimum}}{{#maximum}}@Max({{maximum}}L) {{/maximum}}{{/isLong}}{{!
Not Integer, not Long => we have a decimal value!
}}{{^isInteger}}{{^isLong}}{{!
minimum for decimal value
}}{{#minimum}}@DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}}, inclusive=false{{/exclusiveMinimum}}) {{/minimum}}{{!
maximal for decimal value
}}{{#maximum}}@DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}}, inclusive=false{{/exclusiveMaximum}}) {{/maximum}}{{!
close decimal values
}}{{/isLong}}{{/isInteger}}{{/useBeanValidation}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy