method
check_validity!
v8.0.0 -
Show latest stable
- Class:
ActiveModel::Validations::FormatValidator
check_validity!()public
No documentation available.
# File activemodel/lib/active_model/validations/format.rb, line 20
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 :with
check_options_validity :without
end