Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop

This commit is contained in:
rajesh
2024-09-24 19:33:18 +05:30

View File

@@ -206,14 +206,13 @@ public class FormDao {
FieldValidator validator = FieldValidator.create();
formResponseBean.getContent().forEach(contentResponseBean -> {
String fieldId = contentResponseBean.getId();
String value = String.valueOf(formFieldMap.get(fieldId));
String value = (String) formFieldMap.get(fieldId);
if(value == null && isApplicationFormExist) {
return;
}
FieldValidatorBean fieldValidatorBean = Utils.convertSourceObjectToDestinationObject(contentResponseBean.getValidators(), FieldValidatorBean.class);
validator
.notNull(value, fieldId)
.isRequired(value,fieldValidatorBean.getIsRequired(),fieldId)
.minLength(value, fieldValidatorBean.getMinLength(), fieldId) // Only applies if minLength is not null
.maxLength(value, fieldValidatorBean.getMaxLength(), fieldId) // Only applies if maxLength is not null