Newer
Older
validator / src / main / java / io / ljunggren / validator / annotation / ExactMatch.java
@Alex Ljunggren Alex Ljunggren on 16 Aug 2024 513 bytes Refactored to include message in annotation
package io.ljunggren.validator.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface ExactMatch {

	String match() default NULL;
	String[] matches() default {};
	boolean caseSensitive() default true;
	
	public static final String NULL = "THIS IS A SPECIAL NULL VALUE - DO NOT USE";
    String message();
    
}