io.dropwizard.validation.MethodValidator Maven / Gradle / Ivy
package io.dropwizard.validation;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* A validator for {@link ValidationMethod}-annotated methods.
*/
public class MethodValidator implements ConstraintValidator {
@Override
public void initialize(ValidationMethod constraintAnnotation) {
}
@Override
public boolean isValid(Boolean value, ConstraintValidatorContext context) {
return (value == null) || value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy