The state senator backing the measure sees it as a way to reduce sexually transmitted infections among young people.