1

I have a Event class, with many to one Person objects associated with it, (which in turn has its own validator annoations on it. When I validate my Event class though, it's not calling the validation on the related object?

Set<ConstraintViolation<Event>> cv = getValidator().validate(i);

1 Answer 1

3

Annotate the Person field in Event with @Valid to have the validation also validate the Person instance.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.