class ClusterCreationEnvironmentValidator {

    public void validate(Stack stack, DetailedEnvironmentResponse environment, User user, boolean distroxRequest,
        ValidationResult.ValidationResultBuilder validationBuilder) {
        String regionName = cloudPlatformConnectors.getDefault(platform(stack.cloudPlatform()))
                .displayNameToRegion(stack.getRegion());
        String displayName = cloudPlatformConnectors.getDefault(platform(stack.cloudPlatform()))
                .regionToDisplayName(stack.getRegion());
        if (environment != null) {
            if (!CollectionUtils.isEmpty(environment.getRegions().getNames())
                    && environment.getRegions()
                    .getNames()
                    .stream()
                    .noneMatch(region -> region.equals(regionName) || region.equals(displayName))) {
                validationBuilder.error(String.format("[%s] region is not enabled in [%s] environment. Enabled regions: [%s]", stack.getRegion(),
                        environment.getName(), environment.getRegions().getNames().stream().sorted().collect(Collectors.joining(","))));
            }
        }
        validateDatalakeConfig(stack, validationBuilder, user, distroxRequest);
    }

}