@Retention(value=RUNTIME) @Target(value=FIELD) public @interface ExactLength
If you simply wish to require that an option have a minimum length then use
MinLength instead, similarly MaxLength for maximum length.
Alternatively for a range of lengths you can use LengthRange.
| Modifier and Type | Required Element and Description |
|---|---|
int |
length
Exact required length in characters
|
Copyright © 2012–2022. All rights reserved.