jueyue / easypoi

POI tool, excel quick import and export, excel template export, word template export, can complete the import and export of Excel in only 5 lines of code, the modification and export format is simple, rough, fast and effective, easypoi is worth your try
http://opensource.afterturn.cn
Apache License 2.0
143 stars 28 forks source link

PoiValidationUtil 自定义校验返回message字段名重复问题 #9

Open leimingfeng opened 4 years ago

leimingfeng commented 4 years ago

正常我们通过校验字段时,会加上name,这就会导致返回的errorMsg上出现重复字段名的问题 如字段注解如下 @Excel(name = "姓名") @ApiModelProperty(value = "姓名") @NotBlank(message = "姓名不能为空") @Length(max = 30, message = "姓名请少于{max}字") private String username;

实际错误信息会返回 第2条记录,数据校验不通过,原因:姓名姓名不能为空