See https://www.fec.gov/help-candidates-and-committees/candidate-taking-receipts/who-can-and-cant-contribute/, the section on "Foreign Nationals".
The Commission stated, in AO 1998-14, that the use of any surname on a
contribution check (or similar instrument) would not, by itself, give
any reason to inquire as to the person’s nationality. Nonetheless, the
Commission advised the committee to take the following minimally
intrusive steps to ensure that the contributions it received did not
come from foreign nationals:
- Ensure that public political ads and solicitations directed to audiences outside the U.S. contain a summary of the foreign national
prohibition of 52 U.S.C. § 30121.
- Make further inquiry into the nationality of the contributor if the committee receives a contribution postmarked from any non U.S.
- Make further inquiry into the nationality of the contributor if the committee receives a contribution indicating that either the bank
or the account owner has a foreign address.
In all of the these instances, if the contribution is submitted along
with credible evidence (for example, a copy of a valid U.S. passport)
that the contributor is a U.S. citizen, a U.S. national or a permanent
resident alien, no further inquiry need be made. However, if the
committee has actual knowledge that the contributor is in fact a
foreign national, it may not rely on these documents as a defense.
So, if the donor has been informed of the rules and gives a US address, the campaign can assume that they are eligible to donate, unless the campaign has actual knowledge that they aren't. If they give a non-US address, the campaign is supposed to get some other proof of nationality.
By the way, that page also explains that the first part of your question is slightly wrong. It isn't only US citizens who are allowed to donate - US nationals (a rather rare category consisting mostly of people from certain US territories) and permanent residents are also eligible.