12 C.F.R. § 1002.5
(b) Limitation on information about race, color, religion, national origin, or sex. A creditor shall not inquire about the race, color, religion, national origin, or sex of an applicant or any other person in connection with a credit transaction, except as provided in paragraphs (b)(1) and (b)(2) of this section.
(1) Self-test. A creditor may inquire about the race, color, religion, national origin, or sex of an applicant or any other person in connection with a credit transaction for the purpose of conducting a self-test that meets the requirements of § 1002.15. A creditor that makes such an inquiry shall disclose orally or in writing, at the time the information is requested, that:
(2) Permissible inquiries. A creditor may request any information concerning an applicant's spouse (or former spouse under paragraph (c)(2)(v) of this section) that may be requested about the applicant if: