I have a friend who is interested in running for Governor of California. Even though he will be 18 (the minimum age) before the general election, he will still be 17 by the time the primary comes around. Is he legally allowed to run for governor?
I don't see updated rules for 2018, but in 2014 the rules said:
Be a registered voter and otherwise qualified to vote for that office at the time that nomination papers are issued to the person.
Between February 10, 2014 (E-113), and March 7, 2014 (E-88), obtain nomination documents from the county elections official of the candidate's county of residence. Nomination documents include nomination papers for collecting signatures and a Declaration of Candidacy that must be executed by the candidate.
To register to vote, the rules say:
18 years old or older on Election Day,
But as previously discussed, one can't vote in California in a primary until eighteen.
So from all this, to run for governor in California, you would most likely have to be eighteen prior to obtaining the nomination papers. And the nomination papers are due prior to the primary. So if your friend won't be 18 by the primary, it looks to be no go.
This result is specific to California. Other states may have explicit minimum ages to run for office or may allow people who will be 18 by the time of the general election to vote.