Validation error: “No validator could be found for type: java.lang.Integer”

前端 未结 5 522
故里飘歌
故里飘歌 2021-02-04 23:06

I am working on a project with Spring why do I keep getting the following error?

javax.validation.UnexpectedTypeException:
No validator could be fou

5条回答
  •  遇见更好的自我
    2021-02-04 23:51

    As stated in problem, to solve this error you MUST use correct annotations. In above problem, @NotBlank or @NotEmpty annotation must be applied on any String field only.

    To validate long type field, use annotation @NotNull.

提交回复
热议问题