The bill was inspired by the headline-grabbing case of 41-year-old Modesto teacher James Hooker, who left his wife and kids to move in with his 18-year-old student, Jordan Powers.
An Assembly committee voted down the bill Tuesday by a vote of 3-0.
The bill's author accused committee members of standing with predators. The bill was opposed by the state teachers union and the American Civil Liberties Union (ACLU).