content: package aspera.registration.constarint;
  
  import java.lang.annotation.Documented;
  import java.lang.annotation.ElementType;
  import java.lang.annotation.Retention;
  import java.lang.annotation.Target;
  
  import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
  import static java.lang.annotation.ElementType.TYPE;
  import static java.lang.annotation.RetentionPolicy.RUNTIME;
  
  import javax.validation.Constraint;
  import javax.validation.Payload;
  
  /**
   * @Created 02 / 06 / 2020 - 2:29 PM
   * @project SpringRegistration
   * @Author Hamdamboy
   */
  @Target({TYPE, ANNOTATION_TYPE})
  @Retention(RUNTIME)
  @Constraint(validatedBy = FieldMatchValidator.class)
  @Documented
  public @interface FieldMatch {
      String message() default "{constraints.field-match}";
      Class<?>[] groups() default {};
      Class<? extends Payload>[] payload() default {};
      String first();
      String second();
      @Target({TYPE, ANNOTATION_TYPE})
      @Retention(RUNTIME)
      @Documented
      @interface List
      {
          FieldMatch[] value();
      }
  }
  