Added validation to trip.rb