Open Sammygracezhu opened 4 years ago
@NotEmpty along with @Size should solve the problem
When submit without selected any ingredients, no error is displayed with the new page.
I added: @manytomany(targetEntity=Ingredient.class) @NotNull(message="You must choose at least 1 ingredient") private List ingredients;
Can be coused by https://github.com/habuma/spring-in-action-5-samples/issues/78
When submit without selected any ingredients, no error is displayed with the new page.
I added: @ManyToMany(targetEntity=Ingredient.class) @NotNull(message="You must choose at least 1 ingredient") private List ingredients;