How do you validate the availability for a "block of time"?

I'm building an "appointment time" application, where the user selects
an appointment time through a datetime_select field.

I'm trying to validate that the appointment time the user selects is
available.

The appointment times are for 30 minutes each, so a user should not be
able to create a new appointment time within 30 minutes of an existing
appointment.

Do you know how to validate that in the Appintment model?

(e.g.

def validates_available_appointment_time_slot
  ...
end

)

Any ideas?

Bob -