Exodus 21:8

Amplified Bible (AMP)
If she does not please her master who has chosen her for himself [as a wife], he shall let her be redeemed [by her family]. He does not have the authority to sell her to a foreign people, because he has been unfair to her.

Read Exodus 21:8 in other translations