The election wouldn't be ruled invalid. Only the candidate would be ruled ineligible. That may not seem logical, but rember we didn't really vote for a candidate or a slate, we voted for electors pledged to that slate. The laws of many states require not voting for the candidate whose name was on the ballot, but rather for the candiate of the party whom they were elected to vote for. Californial for example.
If Leo Donofrio’s case is upheld BOTH John McCain and Obama would be found ineligible to be president.
http://www.blogtext.org/naturalborncitizen/