最大长度校验 @param v 值 @param excelCheck 注解 @param i 行数 @param fieldName excel段名 @param errList 错误信息集合
(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList)
| 132 | * @param errList 错误信息集合 |
| 133 | */ |
| 134 | private static void maxLength(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList) { |
| 135 | if (ObjectUtil.isNotEmpty(v) && excelCheck.maxLength() != -1 && v.toString().length() > excelCheck.maxLength()) { |
| 136 | StringBuilder err = new StringBuilder("第").append(i).append("行,").append(fieldName).append("长度超过:").append(excelCheck.maxLength()).append(";"); |
| 137 | errList.add(err.toString()); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * 正则校验 |