At least seven county clerks have signed up to resist the “Green Light” law that lets undocumented immigrants get New York driver’s licenses. So far, that resistance is kosher — and it better remain so.

The law’s most vocal critic, Erie County Clerk Michael Kerns, says it violates the federal Immigration Reform and Control Act of 1986 by rewarding people in the country illegally. He also faults the ease with which (as noted above) it could allow illegal immigrants to register to vote.

Kerns sent official notice to the Erie County Attorney calling the legislation “inconsistent with federal law” and announcing his plan to challenge it in federal court.

County clerks in Renesselaer, Niagara, Genessee, Oneida, Chautauqua and Allegany have followed along, vowing to disregard the new law and send illegal immigrants seeking licenses elsewhere.

Unless a federal judge issues an injunction in time, this is perilously close to a refusal to do their jobs, practically begging Gov. Andrew Cuomo to use his power to remove any clerk who defies state law. Public opinion, especially in these counties, certainly opposed the Green Light law, but that’s not a license for defiance.

The new law doesn’t kick in until December, so there’s time to resolve the federal case. But the clerks will do themselves a big favor by announcing that they’ll accept defeat if the feds rule against them.

As we said above, it’s the voters’ job to respond to a Legislature that’s gone wild. Any state official who willfully defies valid legislation is attacking the rule of law itself.