|
|
|
Java 8 comes with the {{Optional}} wrapper type. JavaFX comes with a hierarchy of property types such as {{StringProperty}} which wrap a "normal" data type to make it observable etc.
When putting constraints to properties of these types, it's often desirable to let the constraints apply to the wrapped value instead of the wrapper object, e.g.:
{code} @Size(min=2) private Optional<String> foo = ...;
@Min(42) private LongProperty bar = ...; {code}
To accomodate for such requirements, Hibernate Validator provides the concept of [unwrapping values|https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#section-value-handling] prior to validation.
We should provide unwrapper implementations for {{Optional}} and the JavaFX property types.
|
|
|
|