def validate_file(rules: dict, fname: dict):
    """
    Validates files by BIDS-compatible identifiers
    Parameters
    ----------
    rules : dict
        Dictionary with keys of BIDS-recognized key and their accepted values.
    fname : str
        File to validate.
    """
    valid = []
    for key, value in rules.items():
        if f"{key}-{value}" in fname:
            valid.append(True)
        else:
            valid.append(False)
    return all(valid)