Validates a style and associated value.

    Arguments
    ---------
    style: str
       The style to validate (e.g. 'color', 'size' or 'marker')
    value: 
       The style value to validate
    scalar: bool


    Returns
    -------
    valid: boolean or None
       If validation is supported returns boolean, otherwise None

def validate(style, value, scalar=False):
    """
    Validates a style and associated value.

    Arguments
    ---------
    style: str
       The style to validate (e.g. 'color', 'size' or 'marker')
    value: 
       The style value to validate
    scalar: bool


    Returns
    -------
    valid: boolean or None
       If validation is supported returns boolean, otherwise None
    """
    validator = get_validator(style)
    if validator is None:
        return None
    if isinstance(value, (np.ndarray, list)):
        if scalar:
            return False
        return all(validator(v) for v in value)
    return validator(value)