Amakesh

Untitled

Apr 2nd, 2022 (edited)
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. @Documented
  2. @Constraint(validatedBy = CapacityValidator.class)
  3. @Target( {ElementType.TYPE_USE, ElementType.METHOD, ElementType.FIELD })
  4. @Retention(RetentionPolicy.RUNTIME)
  5. public @interface Capacity {
  6.  
  7.     String message() default "All fields at once must be filled in or empty!";
  8.     Class<?>[] groups() default {};
  9.     Class<? extends Payload>[] payload() default {};
  10.     int min();
  11.    // int max();
  12. }
Add Comment
Please, Sign In to add comment