President Obama slammed Donald Trump as “irresponsible” for claiming that November’s election would be rigged against him while advising that Trump stop “whining” even before the results are in.

“There is no serious person out there who would suggest somehow that you could even — you could even rig America’s elections,” Obama said at a press conference at the Rose Garden Tuesday, while pointing out how decentralized U.S. elections are and the lack of evidence of fraud in the past.

He also suggested that Trump’s “unprecedented” attempt to “discredit” an elections process before it has even taken place shows the he does not have “leadership and toughness that you’d want out of a president.”

“You start whining before the game’s even over? If whenever things are going badly for you and you lose you start blaming somebody else, then you don’t have what it takes to be in this job,” Obama said.

Trump has in recent weeks gone beyond his usual claims of a political system vaguely biased against him, to suggest that there would be voter fraud at the precinct level, a claim that has troubled observers and lawmakers across the political spectrum.

Obama on Monday said that one of the “greatest” things about U.S. democracy is bipartisan tradition surrounding the transfer of presidential power.

“Historically, regardless of party, the person who loses the election congratulates the winner, reaffirms or democracy and we move forward,” Obama said. “That’s how democracy survives, because we recognize that there’s something more important than any individual campaign, and that is making sure that the integrity and trust in our institutions sustains itself, because democracy by definition works by consent. Not by force.”

The President said that he had never seen, in his lifetime, or in modern presidential campaign, a nominee engaged in the kind of rhetoric Trump has put forward recently.

“I’d advise Mr. Trump to stop whining and go try to make his case to get votes,” Obama said. “And if he got the most votes, then it would be my expectation of Hillary Clinton to offer a gracious concession speech and pledge to work with him in order to make sure that the American people benefit from an effective government.”