Here is the applicable federal law:
18 U.S.C. § 922
...
(d) It shall be unlawful for any person to sell or otherwise
dispose of any firearm or ammunition to any person knowing
or
having reasonable cause to believe that such person -
(1) is under indictment for, or has been convicted in any court
of, a crime punishable by imprisonment for a term exceeding one
year;
(2) is a fugitive from justice;
(3) is an unlawful user of or addicted to any controlled
substance (as defined in section 102 of the Controlled Substances
Act (21 U.S.C. 802));
(4) has been adjudicated as a mental defective or has been
committed to any mental institution;
(5) who, being an alien -
(A) is illegally or unlawfully in the United States; or
(B) except as provided in subsection
(2), has been
admitted to the United States under a nonimmigrant visa (as
that term is defined in section 101(a)(26) of the Immigration
and Nationality Act (8 U.S.C. 1101(a)(26)));
(6) who (!2) has been discharged from the Armed Forces under
dishonorable conditions;
(7) who, having been a citizen of the United States, has
renounced his citizenship;
(8) is subject to a court order that restrains such person from
harassing, stalking, or threatening an intimate partner of such
person or child of such intimate partner or person, or engaging
in other conduct that would place an intimate partner in
reasonable fear of bodily injury to the partner or child, except
that this paragraph shall only apply to a court order that -
(A) was issued after a hearing of which such person received
actual notice, and at which such person had the opportunity to
participate; and
(B)(i) includes a finding that such person represents a
credible threat to the physical safety of such intimate partner
or child; or
(ii) by its terms explicitly prohibits the use, attempted
use, or threatened use of physical force against such intimate
partner or child that would reasonably be expected to cause
bodily injury; or
(9) has been convicted in any court of a misdemeanor crime of
domestic violence.