final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
.resource(HolidayApiConstants.HOLIDAY_RESOURCE_NAME);
if (this.fromApiJsonHelper.parameterExists(HolidayApiConstants.nameParamName, element)) {
final String name = this.fromApiJsonHelper.extractStringNamed(HolidayApiConstants.nameParamName, element);
baseDataValidator.reset().parameter(HolidayApiConstants.nameParamName).value(name).notNull().notExceedingLengthOf(100);
}
if (this.fromApiJsonHelper.parameterExists(HolidayApiConstants.fromDateParamName, element)) {
final LocalDate fromDate = this.fromApiJsonHelper.extractLocalDateNamed(HolidayApiConstants.fromDateParamName, element);
baseDataValidator.reset().parameter(HolidayApiConstants.fromDateParamName).value(fromDate).notNull();