Flowdock
method

validate_each

Importance_0
v3.2.8 - Show latest stable - 0 notes - Class: ActiveModel::Validations::FormatValidator
validate_each(record, attribute, value) 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/format.rb, line 5
      def validate_each(record, attribute, value)
        if options[:with]
          regexp = option_call(record, :with)
          record_error(record, attribute, :with, value) if value.to_s !~ regexp
        elsif options[:without]
          regexp = option_call(record, :without)
          record_error(record, attribute, :without, value) if value.to_s =~ regexp
        end
      end
Register or log in to add new notes.