I have a simple class, which I'd like to validate:
public class Model {
@NotNull
private String someField;
@AssertTrue
public boolean methodConstraint() { ... }
}
This class is validated as part of the inputs of a spring controller method.
I managed to configure the validation of the fields (someField in this case), but for some reason the methodConstraint() isn't even invoked, let alone validated. I remember this being possible.
I use the default Spring boot 2.6.6 configuration for validation, which means I use the 6.2.3 version of hibernate validator, with the 2.0.2 API version.
I suspect it is the ValidatorImpl:454 where thing go sideways, because this method only validates (direct) meta constraints, but method constraints don't seem to be considered as such.