method

where

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: ActiveModel::Errors
where(attribute, type = nil, **options) public

Search for errors matching attribute, type, or options.

Only supplied params will be matched.

person.errors.where(:name) # => all name errors.
person.errors.where(:name, :too_short) # => all name errors being too short
person.errors.where(:name, :too_short, minimum: 2) # => all name errors being too short and minimum is 2
Show source
Register or log in to add new notes.