I don’t think that there is any law that says that someone who is ineligible can’t run for the nomination of a party.
I further don’t think that there is any law that says someone who is ineligible can’t run for president.
“No Person except a natural born Citizen, or a Citizen of the United States, at the time of the Adoption of this Constitution, shall be eligible to the Office of President;”
It only seems to suggest that one’s eligibility is tested at the time one tries to take office, and that occurs after one is elected.