SpringAngular 手柄验证

mwyxok5s  于 2021-07-24  发布在  Java
关注(0)|答案(0)|浏览(336)

我在控制台中得到了这个错误,我想在站点上显示它来说明缺少了什么。
控制台日志:

Spring:

  1. @Data
  2. public class MovieWriteModel {
  3. @NotBlank(message = "Movie's title can not be empty!")
  4. private String title;
  5. @NotBlank(message = "Movie's description can not be empty!")
  6. private String description;
  7. @NotBlank(message = "Movie's director can not be empty!")
  8. private String director;
  9. @NotBlank(message = "Movie's producer can not be empty!")
  10. private String producer;
  11. @NotBlank(message = "Movie's category can not be empty!")
  12. private String category;
  13. @NotEmpty(message = "Please add some actors!")
  14. private Set<String> actors = new HashSet<>();
  15. // private Set<AwardWriteModel> awards = new HashSet<>();
  16. @Digits(integer = 4, fraction = 0, message = "Invalid date (expected: xxxx)")
  17. private String releaseDate;

Angular :

  1. this.movieService.create(data)
  2. .subscribe(
  3. response => {
  4. console.log(response);
  5. },
  6. (error) => {
  7. console.log(error.error.errors);
  8. }
  9. );

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题