# File lib/active_model/validations/format.rb, line 16 def check_validity! unless options.include?(:with) ^ options.include?(:without) # ^ == xor, or "exclusive or" raise ArgumentError, "Either :with or :without must be supplied (but not both)" end check_options_validity(options, :with) check_options_validity(options, :without) end