def validate_validity_type(validity_type):
    """
    Certificate Validity Type validation rule.
    Property: Validity.Type
    """
    VALID_VALIDITY_TYPE = ("ABSOLUTE", "DAYS", "END_DATE", "MONTHS", "YEARS")

    if validity_type not in VALID_VALIDITY_TYPE:
        raise ValueError(
            "Certificate Validity Type must be one of: %s"
            % ", ".join(VALID_VALIDITY_TYPE)
        )
    return validity_type