Allowing California to require U.S. presidential candidates to reveal their tax returns would “open the floodgates” for states to demand other information including medical records and school transcripts, a Sacramento federal judge said Tuesday in an order blocking the new state law.

U.S. District Judge Morrison England Jr.’s order, affirming an earlier tentative decision, stops California from enforcing a law that would have required President Donald Trump to disclose his tax returns to appear on the 2020 primary ballot. Trump has resisted releasing his returns despite promising to do so as a candidate in 2016.