com.vcollaborate.validation.constraints.allowedvalues.AllowedStrings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation.constraints Show documentation
Show all versions of validation.constraints Show documentation
JSR-303 Validator to validate a Daterange and other range constraints.
/**
* Copyright (C) 2012 Christian Sterzl
*
* This file is part of ValidationConstraints.
*
* ValidationConstraints is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ValidationConstraints is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ValidationConstraints. If not, see .
*/
package com.vcollaborate.validation.constraints.allowedvalues;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
/**
* @author Christian Sterzl
*/
@Constraint(validatedBy = AllowdStringsValidator.class)
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AllowedStrings {
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
String message() default "Invalid value";
String[] value();
boolean nullAllowed() default true;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy