Former GOP presidential candidates Sen. Ted Cruz (R-TX) and Ohio Gov. John Kasich both slammed presumptive Republican nominee Donald Trump over his comments about the judge handling the Trump University case suggesting his ethnicity is a conflict of interest.

“Of course, it’s inappropriate to be attacking a federal judge’s race or ethnicity,” Cruz stated during an interview with NBC News. “You’re going to have to ask Donald to explain the reason he says the things he does. I’m not going to try to do so.”

Kasich took to Twitter, saying Trump should apologize.

Attacking judges based on their race &/or religion is another tactic that divides our country. More importantly, it is flat out wrong.(1of2) — John Kasich (@JohnKasich) June 6, 2016

.@RealDonaldTrump should apologize to Judge Curiel & try to unite this country. #TwoPaths (2of2) — John Kasich (@JohnKasich) June 6, 2016

Republicans, including Speaker of the House Paul Ryan and former Speaker Newt Gingrich, have criticized Trump’s accusation about Judge Gonzalo Curiel.

Trump suggested Curiel, who is overseeing Trump University’s fraud case, is biased and has “an absolute conflict” of interest because “of Mexican heritage.”

Trump says the conflict comes because of his own position on illegal immigration and plans to build a wall along the southern border.