public class PastValidatorForYearMonth extends Object implements javax.validation.ConstraintValidator<javax.validation.constraints.Past,YearMonth>
Past constraint against YearMonth.
You have to add this validator to the list of constraint validators.
This is done by adding the resource META-INF/validation/mapping.xml to
your Validation configuration. You have to either create a
META-INF/validation.xml and add that mapping or you do it programmatically
with Configuration.addMapping(java.io.InputStream).| Constructor and Description |
|---|
PastValidatorForYearMonth() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(javax.validation.constraints.Past constraintAnnotation) |
boolean |
isValid(YearMonth date,
javax.validation.ConstraintValidatorContext context) |
public void initialize(javax.validation.constraints.Past constraintAnnotation)
initialize in interface javax.validation.ConstraintValidator<javax.validation.constraints.Past,YearMonth>Copyright © 2016. All rights reserved.