The court did not weigh in on the merits of the law, but the conservative majority said it can be enforced while a lawsuit moves forward.