added?(attribute, message = nil, options = {})
public
Returns true if an error on the attribute with the given message is
present, false otherwise. message is treated the same as for
add.
p.errors.add :name, :blank
p.errors.added? :name, :blank
# File activemodel/lib/active_model/errors.rb, line 262
def added?(attribute, message = nil, options = {})
message = normalize_message(attribute, message, options)
self[attribute].include? message
end