class ActiveModel::Error

def details

# => { error: :too_short, count: 5 }
error.details
error = ActiveModel::Error.new(person, :name, :too_short, count: 5)

Returns the error details.
def details
  { error: raw_type }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
end