Annotations from javax.validation.constraints not working

后端 未结 15 1355
广开言路
广开言路 2020-11-28 06:23

What configuration is needed to use annotations from javax.validation.constraints like @Size, @NotNull, etc.? Here\'s my code:

15条回答
  •  萌比男神i
    2020-11-28 06:28

    You need to add @Valid to each member variable, which was also an object that contained validation constraints.

提交回复
热议问题