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

org.biins.validation.collection.constraints.ValidElements Maven / Gradle / Ivy

The newest version!
package org.biins.validation.collection.constraints;

import org.biins.validation.collection.constraints.impl.ValidElementsConstraintValidator;
import org.springframework.validation.Validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author Martin Janys
 */
@Documented
@Constraint(validatedBy = ValidElementsConstraintValidator.class)
@Target({
        ElementType.METHOD,
        ElementType.FIELD
})
@Retention(RetentionPolicy.RUNTIME)
@ElementsValidator
public @interface ValidElements {

    Class value();

    Class element() default Object.class;

    String message() default "{validation.collection.constraints.spring.ValidElements}";

    Class[] groups() default {};

    Class[] payload() default {};

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy