Judge: US election official violated law in voter form case