this provides convenient API to create a parent class validator that can also validate different inherited classes extending it.
example:
given a class called Child that extends Parent, one could utilize constraintOnClass in the following way:
ValidatorBuilder.<Parent>of()
// constraints for parent
.constraint(...)
.constraintOnClass(Child.class), b -> b
// constraints for child
.constraint(...)
.constraint(...)
.constraint(...)
)
)
added constraintOnClass api to resolve issue: https://github.com/making/yavi/issues/278
this provides convenient API to create a parent class validator that can also validate different inherited classes extending it.
example:
given a class called Child that extends Parent, one could utilize constraintOnClass in the following way: