package com.github.aureliano.achmed.annotation;

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

import com.github.aureliano.achmed.validation.PatternValidator;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Constraint(validatedBy = PatternValidator.class)
public @interface Pattern {

	public abstract String message() default "Expected field #{0} to match #{1} regular expression.";
	
	public abstract String value();
}
Create Pattern annotation.