instance method check_validity!

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

check_validity!()

No documentation comment.

Source
# File activemodel/lib/active_model/validations/format.rb, line 15
      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

Defined in activemodel/lib/active_model/validations/format.rb line 15 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Validations::FormatValidator

Type at least 2 characters to search.

↑↓ navigate · open · esc close