Annotation Type Length
Annotation used to validate the length of a string with specified minimum and maximum values.
For custom or stricter length controls, consider using the
Pattern annotation instead.
* Example usage:
*
*
* public class UserDto {
* @Length(min=8, max=16)
* private String password;
* }
*
* -
Optional Element Summary
Optional Elements
-
Element Details
-
min
int min- Default:
0
-
max
int max- Default:
2147483647
-
message
String message- Default:
"Field value must fit the length!"
-