All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.thksystems.validation.beanvalidation.ValidatedBy Maven / Gradle / Ivy

Go to download

Commons for persistence, hibernate, xstreams, enterprise, spring, servlets, ...

There is a newer version: 3.9.0
Show newest version
/*
 * tksCommons / mugwort
 * 
 * Author : Thomas Kuhlmann (ThK-Systems, http://www.thk-systems.de) License : LGPL (https://www.gnu.org/licenses/lgpl.html)
 */
package de.thksystems.validation.beanvalidation;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * The annotated element will be validated by the given {@link CustomValidatorI}.
 */
@Documented
@Constraint(validatedBy = ValidatedByValidator.class)
@Target({ METHOD, FIELD, TYPE })
@Retention(RUNTIME)
public @interface ValidatedBy {
	String message() default "Validation failed.";

	Class[] groups() default {};

	Class[] payload() default {};

	Class implementingClass();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy