If California legislators get their way, President Donald Trump will be ineligible for the state’s primary ballot next year unless he releases his tax returns.

California Gov. Gavin Newsom signed into law a mandate that will of course face court challenges from the Trump administration, but could also spur other states to adopt similar rules.

The law requires all presidential candidates to release five years of tax filings, and must do so by late November if they want to ensure a spot on March’s election year primary ballot. The documents will be posted online with some private information redacted, according to a Los Angeles Times report.

“As one of the largest economies in the world and home to one in nine Americans eligible to vote, California has a special responsibility to require this information of presidential and gubernatorial candidates,” Newsom said in a statement. “These are extraordinary times and states have a legal and moral duty to do everything in their power to ensure leaders seeking the highest offices meet minimal standards, and to restore public confidence. The disclosure required by this bill will shed light on conflicts of interest, self-dealing, or influence from domestic and foreign business interest.”

The communications director for Trump’s reelection campaign, Tim Murtagh, has already sounded off on the bill.

“The Constitution is clear on the qualifications for someone to serve as president and states cannot add additional requirements on their own,” he said. “The bill also violates the 1st Amendment right of association, since California can’t tell political parties which candidates their members can or cannot vote for in a primary election.”

Candidates releasing their tax returns isn’t required by law, but it has been routine since 1973. Only Gerald Ford in 1976 and Trump in 2016 have refused to release their returns.

Newsom has been a frequent critic of Trump’s refusal and misleading statements on why he’s refused to release his returns. Trump has often said that they are under audit so he can’t release them. However, the IRS contends there is no such law stopping Trump from releasing them.

As for the inevitable court challenges, constitutional scholars were consulted in the drafting the language in an effort to get it to pass legal muster.

Legislatures in 18 states have considered bills to force presidential candidates to release their tax returns, but that is unlikely to force Trump to do so.

Just last week, the Trump administration sued to stop the House of Representatives from obtaining his New York state returns, which were made available by Gov. Andrew Cuomo, another Democrat, earlier this month.

If California’s law remains on the books, Trump has a couple of options: Release his returns or risk California’s 172 delegates to next year’s Republican National Convention going to a long-shot primary challenger. As a possible back-up plan, the law doesn’t stop people from writing in a candidate, and it’s not like Trump has a chance to win California anyway.

Richard L. Hasen, a UC Irvine election law professor, warned that the California Democrats are treading on a slippery slope.

“If you think of this purely as a political matter and not a legal matter, what could a Republican legislature in a swing state do to hurt a Democratic presidential candidate’s chance to get on the ballot?” he said. “That’s really the Pandora’s box.”