use of com.github.lybgeek.validator.model.ValidResult in project springboot-learning by lyb-geek.
the class BaseAnalysisEventListener method validatePass.
private boolean validatePass(T entity, AnalysisContext analysisContext) {
ValidResult validResult = ValidatorUtils.allCheckValidate(entity, false, ExcelGroup.class);
if (!validResult.isSuccess()) {
String errorMsg = StringUtils.join(validResult.getErrorMessages(), ",");
ErrorExcelRow errorExcelRow = this.setAndReturnErrorExcelRow(analysisContext, errorMsg);
errorExcelRows.add(errorExcelRow);
}
return validResult.isSuccess();
}
Aggregations