Cody Duane Scott Herrera was found guilty of statutory rape of a 14-year-old girl on Sunday.
He faced up to 15 years in prison, but his sentence was suspended for a one-year program. If Herrera, of Twin Falls, Idaho, doesn't have sex for that year, he'll be released on probation, which will require him to stay sexless until marriage.
Judge Randy Stoker said the probation condition was necessary because Herrera claimed he has had 34 sexual partners.
It was his intent from the beginning to take what he wanted from my 14-year-old child -- her virginity. ... Cody robbed her of her innocence.
Herrera originally pled guilty in March 2016. He may face child pornography charges in an unrelated case, MagicValley.com reports.
I think if he appealed, he would win.
Shaakirrah Sanders, an associate professor at the University of Idaho College of Law, said the condition may be unenforceable and may "infringe on his constitutional rights."
The Associated Press contributed to this report.
WATCH | For more news you need, check out our 60 Second Circa.