unique entries

I have this table associating airlines with rental cars. It has four
columns - user_id, airline_id, rentalcar_id and id. I need to make sure
that the combo of airline_id and rentalcar_id is always unique - in
other words, a user cannot have two fields with the same airline_id and
rentalcar_id. Is this done with one of the validation commands in the
model? I have look at the one that I can find and none seems to fit all
that well. Thanks,

Create a unique index on user_id, airline_id, rentalcar_id in your migration... that would be one way