SpringAngular 手柄验证

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

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

Spring:

@Data
public class MovieWriteModel {
    @NotBlank(message = "Movie's title can not be empty!")
    private String title;
    @NotBlank(message = "Movie's description can not be empty!")
    private String description;
    @NotBlank(message = "Movie's director can not be empty!")
    private String director;
    @NotBlank(message = "Movie's producer can not be empty!")
    private String producer;
    @NotBlank(message = "Movie's category can not be empty!")
    private String category;
    @NotEmpty(message = "Please add some actors!")
    private Set<String> actors = new HashSet<>();
    //    private Set<AwardWriteModel> awards = new HashSet<>();
    @Digits(integer = 4, fraction = 0, message = "Invalid date (expected: xxxx)")
    private String releaseDate;

Angular :

this.movieService.create(data)
      .subscribe(
        response => {
          console.log(response);
        },
        (error) => {
          console.log(error.error.errors);
        }
      );

暂无答案!

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

相关问题