public boolean validateLoadBalancerMapping(List<LoadBalancerMapping> mappings) {
        boolean isMappingFieldsExists = true;
        String errorMessage;
        for (LoadBalancerMapping mapping : mappings) {
            if (mapping.getPort() == null) {
                isMappingFieldsExists = false;
                errorMessage = mapping.getContextPaths() != null ? "for contextPaths: " + String.join(",", mapping.getContextPaths()) : "";
                WorkflowLogger.persist(ValidatorActivity.LB_PORT_REQUIRED, LoggerTags.ERROR, errorMessage);
                addErrorMessage(ValidatorActivity.LB_PORT_REQUIRED.getActivityMessage(), errorMessage);
            }
            if (mapping.getContextPaths() == null || mapping.getContextPaths().isEmpty()) {
                isMappingFieldsExists = false;
                errorMessage = mapping.getPort() != null ? "for port:" + mapping.getPort() : "";
                WorkflowLogger.persist(ValidatorActivity.LB_CONTEXT_PATH_REQUIRED, LoggerTags.ERROR, errorMessage);
                addErrorMessage(ValidatorActivity.LB_CONTEXT_PATH_REQUIRED.getActivityMessage(), errorMessage);
            }
        }
        return isMappingFieldsExists;
    }
validate port and contextPaths in the loadBalancer mapping.
@param mappings
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/LoadBalancerValidator.java