A judge from Texas sentenced a 20-year-old man to marry his 19-year-old girlfriend as an alternative to giving him jail time for picking a fight with his girlfriend's ex-boyfriend.

Josten Bundy was charged with assault in February after he got into an altercation with his girlfriend Elizabeth Jaynes' ex-boyfriend after he said "disrespectful things to Elizabeth."

Bundy hit him in the jaw twice, and while he did not suffer severe injuries, the ex-boyfriend decided to press charges, according to the New York Daily News.

Bundy married Jaynes shortly after Judge Randall Rogers ordered the ultimatum, in which he had to marry her within 30 days as part of his probation, or face jail time for 15 days if he failed to do so.

But the couple admitted that it deprived them the opportunity to plan the wedding of their dreams.

"It just felt like we weren't going to be able to have the wedding we wanted. It was just going to be kind of pieced together. I didn't even have a white dress," Jaynes said, according to KLTV.

Blake Bailey, a lawyer who practices constitutional law, said that a court order to marry is not legal.

"To say you're not going to be criminally punished if you get married is way out of left field. It sounds like the old days of shotgun weddings, but not even the judge is capable of enforcing, what he thinks is best for some people in his court," Bailey said, according to ABC News.