It’s unconstitutional for federal races, but it may be OK for stand and local races.
The law applies to gubernatorial and presidential candidates, who must meet the criteria for becoming governor or president as spelled out in the state constitution and Federal Constitution
They would have to ammend those for this Banana Republic law to have any effect and then it would be redundant