import re


def validate_postal_code(postal_code: str) -> bool:
    """
    Validate a postal code string non-case sensitive.

    :param postal_code: a str
    :precondition: the function is provided with an argument as defined in the PARAM statement above
    :postcondition: return an object as defined by the return statement below
    :return: True or False

    >>> validate_postal_code('111 111')
    False
    >>> validate_postal_code('XXX XXX')
    False
    >>> validate_postal_code('1X1 X1X')
    False
    >>> validate_postal_code('A1A 1A1')
    True
    >>> validate_postal_code('a1a 1a1')
    True
    >>> validate_postal_code('A1A1A1')
    True
    """
    # REGEX USED HERE
    pattern = re.compile(r'^[A-Za-z]\d[A-Za-z] ?\d[A-Za-z]\d$')

    return True if pattern.search(postal_code) else False