Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user