Updated code for table validation

This commit is contained in:
nisha
2025-02-14 13:57:39 +05:30
parent 555a5d777a
commit 4fb0a08330

View File

@@ -160,7 +160,7 @@ public class FieldValidator {
public FieldValidator validateCustomTableValidation(String value, String customRule, String fieldId, ContentResponseBean contentResponseBean) { public FieldValidator validateCustomTableValidation(String value, String customRule, String fieldId, ContentResponseBean contentResponseBean) {
if (customRule == null || value == null) { if (customRule == null ) {
return this; // No custom rule to validate return this; // No custom rule to validate
} }
@@ -168,6 +168,7 @@ public class FieldValidator {
case GepafinConstant.NON_EMPTY_TABLES: case GepafinConstant.NON_EMPTY_TABLES:
try { try {
checkTableValidation(value, fieldId, contentResponseBean, errors); checkTableValidation(value, fieldId, contentResponseBean, errors);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
@@ -186,6 +187,7 @@ public class FieldValidator {
.findFirst() // Get the first matching result .findFirst() // Get the first matching result
.orElse(null); // Default to null if no match .orElse(null); // Default to null if no match
if (tableType!=null){ if (tableType!=null){
try { try {
Object object = PdfUtils.extractRows(value);; Object object = PdfUtils.extractRows(value);;