Fox News host Neil Cavuto late Tuesday slammed President Trump over his feud with Sen. Bob CorkerRobert (Bob) Phillips CorkerGOP leaders: No talk of inviting Russia delegation to Capitol Collins and Murkowski face recess pressure cooker on Supreme Court Tougher Russia sanctions face skepticism from Senate Republicans MORE (R-Tenn.) and questioned the president's "erratic behavior."

Cavuto spoke directly to the president, telling him he is alienating senators whose support he needs to pass his tax-reform plan.

“Last time I checked, you are the president of the United States, so tweeting out these tacky insults just seems beneath you,” Cavuto said. “You are running out of friends faster than you are running out of time. You might not like Bob Corker, but a lot of senators do, and you need those senators, sir.”

Trump and Corker have been lobbing insults at each other via Twitter over the past few days. Their feud escalated Tuesday, when the president mocked the senator as “Liddle’ Bob Corker.” 

Cavuto suggested that the president’s personal conflicts are “torpedoing” his own tax reform plan.

“It’s not that some of your ideas aren’t sound, they are,” Cavuto said. “It’s that increasingly, this erratic behavior makes me wonder whether you are.”

Cavuto warned Trump that he will soon lose the support of lawmakers, who will get fed up with his behavior.

”Loyalty works both ways,” Cavuto said. “You can’t drain that swamp if all you’re doing is throwing mud.”