The law was previously struck down by two lower courts that found the measure violated the state's constitution.