Class BeanValidator
java.lang.Object
com.vaadin.flow.data.validator.BeanValidator
com.vaadin.featurepack.data.validator.BeanValidator
- All Implemented Interfaces:
Validator,com.vaadin.flow.data.binder.Validator<Object>,Serializable,BiFunction<Object,com.vaadin.flow.data.binder.ValueContext, com.vaadin.flow.data.binder.ValidationResult>
public class BeanValidator
extends com.vaadin.flow.data.validator.BeanValidator
implements Validator
Vaadin
Validator using the JSR-303 (javax.validation)
annotation-based bean validation.
The annotations of the fields of the beans are used to determine the
validation to perform.
Note that a JSR-303 implementation (e.g. Hibernate Validator or Apache Bean
Validation - formerly agimatec validation) must be present on the project
classpath when using bean validation.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.featurepack.data.Validator
Validator.EmptyValueException, Validator.InvalidValueException -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.vaadin.flow.data.validator.BeanValidator
apply, createContext, getJavaxBeanValidator, getJavaxBeanValidatorFactory, getMessage, getValidationGroups, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
BeanValidator
-
-
Method Details
-
validate
Description copied from interface:ValidatorChecks the given value against this validator. If the value is valid the method does nothing. If the value is invalid, anValidator.InvalidValueExceptionis thrown.- Specified by:
validatein interfaceValidator- Parameters:
value- the value to check- Throws:
Validator.InvalidValueException- if the value is invalid
-