Annotations from javax.validation.constraints not working

后端 未结 15 1349
广开言路
广开言路 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条回答
  •  时光取名叫无心
    2020-11-28 06:40

    In my case i removed these lines

    1-import javax.validation.constraints.NotNull;

    2-import javax.validation.constraints.Size;

    3- @NotNull

    4- @Size(max = 3)

提交回复
热议问题