Hi
I am currently working on my master thesis using Hibernate Validator and it is really great. While working with the library, I came up with the following question:
I have the following constraint which is a constraint composition:
Code:
@ConstraintComposition(CompositionType.OR)
@Deadline
@Min(value = 0)
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = { })
@ReportAsSingleViolation
public @interface MinOnDeadline {
Class<? extends Payload>[] payload() default {};
String message() default "the deadline has expired.";
Class<?>[] groups() default {};
@OverridesAttribute(constraint=Min.class, name="value")
long value();
}
Why do I have to specify a value for the @Min(value = 0) annotation?
Thank you very much.
Oliver