Just to clarify, you cannot “legally” bind anyone to vote other than any way that they choose.
The party *might* apply party sanctions to that delegate, but no US law can force them to do anything.
Actually, this isn’t really a matter of U.S. law. In the Republican convention, the 1st votes will be cast based on the numbers determined from the primary/caucus/conventions. There won’t really be an individual “casting of ballots” per see, so the delegates would really have no chance to vote against their pledge.
2nd round most of them are free to do what they want.