check_validity!() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/validations/numericality.rb, line 22
      def check_validity!
        options.slice(*COMPARE_CHECKS.keys).each do |option, value|
          unless value.is_a?(Numeric) || value.is_a?(Proc) || value.is_a?(Symbol)
            raise ArgumentError, ":#{option} must be a number, a symbol or a proc"
          end
        end

        options.slice(*RANGE_CHECKS.keys).each do |option, value|
          unless value.is_a?(Range)
            raise ArgumentError, ":#{option} must be a range"
          end
        end
      end
Register or log in to add new notes.