I don't recall the Constitution's wording, but it does seem egregiously unfair to the voters. The majority of voters in Connecticut (or wherever) voted for candidate X, but the state's electors are going to be ordered to vote for candidate Y? Is that what democracy looks like?
On the other hand, it would be hilarious to see what happens when a Republican wins the popular vote, and a bunch of blue states are forced to change their votes. A whole lot of "faithless electors" that day, I'd imagine.