Validation of annotation constraints on generic parameters is not supported because types in scala are erased.
Option(null)
andNone
are considered valid, whileSome(null)
is considered invalid. Some (null) is a bad habit. OnlyNotEmpty
andNotBlank
in this library will be compatible withSome(null)
, and all other annotations will throw exceptionsIllegalStateException("oops.")
- AssertFalse
- AssertTrue
- DecimalMax
- DecimalMin
- Digits
- Future
- Max
- Min
- Past
- Pattern
- Size
- NotBlank
- PastOrPresent
- FutureOrPresent
- NotEmpty
- Negative
- NegativeOrZer
- Positive
- PositiveOrZero
- NotNull
- Valid
- CreditCardNumber
- EAN
- Length
- LuhnCheck
- Mod10Check
- Mod11Check
- NotEmpty // deprecated
- Range
- URL
Original annotations.
- AssertNone
- AssertSome
- ByteSize