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

io.dropwizard.validation.MethodValidator Maven / Gradle / Ivy

There is a newer version: 0.40.13
Show newest version
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