Each state also has to certify its electoral vote. It is doubtful that a state would do so if the candidate to which the electors were pledged was ineligible.
Such a pledge is unenforceable. The State election officials would likely decide that the presidential electors for John "The Kid" Doe had been elected by the people and not attempt to interpret the US Constitution.
It may be unenforceable, but in practice, electors are pledged. Each candidate has a slate of electors. When you vote for a particular candidate, you are actually voting for their slate of electors. I believe some states even list them on the ballot.