I have a simple bean, i.e.:
public class MyBean {
private boolean selected;
private String someString;
...
}
So if selected is true, I want someString to be @NotNull etc. .
Any hints, links how to achieve this behaviour?
Thanks
Jonny
You could do this by annotating
MyBeanwith a custom validator, for example:ValidMyBean:
MyBeanValidator: