instance method validate_each

Ruby on Rails 3.2.22.5

Since v3.0.20

Available in: v3.0.20 v3.1.12 v3.2.22.5 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

validate_each(record, attribute, value)

Override this method in subclasses with the validation logic, adding errors to the records errors array where necessary.

Parameters

record req
attribute req
value req
Source
# File activemodel/lib/active_model/validator.rb, line 159
    def validate_each(record, attribute, value)
      raise NotImplementedError, "Subclasses must implement a validate_each(record, attribute, value) method"
    end

Defined in activemodel/lib/active_model/validator.rb line 159 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::EachValidator

Type at least 2 characters to search.

↑↓ navigate · open · esc close