Hibernate validation on static inner classes
hibernate, inner-classes, java, validation
Solution
I got it, you need to mark @Valid on the instances of the someClass and someOtherClass. This fixed the issue for me. Looks like the @Valid annotation I had on my controller for my Thing object wasn't applying recursively to the state of its nested objects.
Problem
Can you not validate static inner classes using hibernate validation? I have the following form: ``` public class Thing { @NotNull // WORKS! private String message; private someClass obj1; private someOtherClass obj2; public static class someClass { @NotNull //DOES NOT WORK private String someField; } public static class someOtherClass { @NotNull //Does NOT WORK private String someOtherField; } } ```