class Crm::Errors::InvalidValues
InvalidValues
is raised if the keys of a create or update request are recognized but include incorrect values. @api public
Attributes
validation_errors[R]
Returns the list of validation errors. The items in the list are hashes consisting of a code
(the name of the validation error, i.e. one of the rails validation error codes), an attribute
name and an English translation (message
). You may use code
to translate the message into other languages. @example
[ { "code" => "blank", "attribute" => "name", "message" => "name is blank", }, ]
@return [Array<Hash{String => String}>] @api public
Public Class Methods
new(message = nil, validation_errors = {})
click to toggle source
Calls superclass method
# File lib/crm/errors.rb, line 139 def initialize(message = nil, validation_errors = {}) super("#{message} #{validation_errors.map{ |h| h['message'] }.to_sentence}.") @validation_errors = validation_errors end