NEW YORK — A lawyer for President Trump on Thursday asked a New York state judge to throw out a lawsuit alleging that Trump violated charity laws — arguing that any mistakes made at the president’s charity were too minor to merit such a case.

But Judge Saliann Scarpulla appeared to be skeptical of their arguments, saying that the Donald J. Trump Foundation was still required to comply with all charity laws, including several that New York’s attorney general alleges the foundation broke.

At the hearing in state court in Lower Manhattan, Alan Futerfas, a private attorney for Trump and his three eldest children, said it was wrong for New York Attorney General Barbara Underwood to accuse them of “waste” at the foundation. None of the Trumps, he said, had ever used the charity’s money to pay for dinner, a vacation home or travel.

“There are no dinners charged to the foundation. There’s no travel, there’s no cars . . . nothing like that,” Futerfas said. Later in the hearing, he returned to the theme: “Travel to Paris — that’s waste, your honor. Your honor knows what waste means.”

The hearing was triggered by Trump’s motion to dismiss ­before it goes to trial a case brought by the New York attorney general alleging that his charity misused funds. It accuses the foundation of paying off legal obligations for Trump’s for-profit businesses, of helping Trump’s presidential campaign, and of buying art that decorated Trump’s golf resort.

The lawsuit, following an investigation prompted by Washington Post reports on Trump’s charitable organization, asked that the Trump Foundation be forced to pay more than $2.8 million in penalties and restitution, that it be shut down, and that Trump and his children be banned from leading other charities in New York state.

Trump and officials from his company have called the lawsuit politically motivated.

Scarpulla did not rule on the motion to dismiss Thursday. She said she wanted to wait for an upcoming ruling on a separate case before a New York appeals court, on the question of whether Trump, as a sitting president, can be sued in state court at all.

But Scarpulla seemed to reject the argument that politics had tainted the case. And she appeared unconvinced by the arguments from Trump’s side, saying that even if the Trump Foundation didn’t buy Trump a trip to Paris, it was still required to comply with charity laws.

Through it all, Scarpulla said, Trump and his children — who were listed as the charity's officers — allegedly did not oversee the foundation as they were supposed to.

“The claim is that there has not been a single board of directors meeting. These individuals are directors. They’re required under state law to have meetings,” Scarpulla said. “Even if they’re doing spectacularly good work, they’re still required to comply with the statute.”

One key argument at Thursday’s hearing concerned Trump’s use of his charity as a political tool during the 2016 Republican primary. In January 2016, Trump skipped a GOP candidates’ debate, and then counterprogrammed it by hosting a televised fundraiser for veterans.

Trump raised about $5.5 million, and $2.8 million of it went into the Trump Foundation. After that, records obtained by the New York attorney general show, Trump’s campaign staff directed which groups should get the foundation’s money, and when.

In several cases, the giveaways were staged at Iowa campaign events, boosting Trump’s image as a charitable man just before the Iowa caucuses.

Underwood has argued that this violated New York state laws that bar charity leaders from using charity money to help themselves personally.

Scarpulla questioned Yael Fuchs, an official with the attorney general’s office, about that claim: “There’s no check from the foundation to Donald J. Trump for President, correct?”

Fuchs said there did not need to be. The foundation’s money was effectively given over to the campaign, even if there was no check.

“The timing and the manner of the distribution was also controlled and directed by the campaign for the political benefit of Mr. Trump the candidate,” Fuchs said, “completely conflating the identity of the charity with the identity of the campaign.”

Futerfas rejected that argument. “Not a dime of that [money] went to the campaign.”

“And you’re saying that the campaign directing where and to whom the funds went is irrelevant?” Scarpulla asked.

“That’s a fact,” Futerfas said. “But it doesn’t satisfy the elements” of an illegal gift under the law, he said.

Futerfas has also argued that, under the Constitution, sitting presidents should not be sued in state court. Scarpulla said she would defer dealing with that argument until a New York appeals court rules on a case brought by former “Apprentice” contestant Summer Zervos. Zervos says that Trump groped her, and that he defamed her by calling her a liar when she came forward.

Even if that court finds that Trump may not be sued, Scarpulla said Thursday, the New York lawsuit might proceed against Trump’s three eldest children and the Trump Foundation itself.