def ebs_settings_validator(param_key, param_value, pcluster_config):
    """
    Validate the following cases.

    Number of EBS volume specified is lower than maximum supported
    Parameter shared_dir is specified in every EBS section when using more than 1 volume
    User is not specifying /NONE or NONE as shared_dir in EBS sections
    """
    errors = []
    warnings = []
    list_of_shared_dir = []
    for section_label in param_value.split(','):
        section = pcluster_config.get_section('ebs', section_label.strip())
        list_of_shared_dir.append(section.get_param_value('shared_dir'))
    max_number_of_ebs_volumes = 5
    num_volumes_specified = len(list_of_shared_dir)
    if num_volumes_specified > max_number_of_ebs_volumes:
        errors.append(
            'Invalid number of EBS volumes ({0}) specified. Currently only supports upto {1} EBS volumes'
            .format(num_volumes_specified, max_number_of_ebs_volumes))
    if num_volumes_specified > 1 and None in list_of_shared_dir:
        errors.append(
            'When using more than 1 EBS volume, shared_dir is required under each EBS section'
            )
    return errors, warnings
