Exception: Ippon::Validate::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ippon/validate.rb

Overview

An exception class which is raised by Schema#validate! when a validation error occurs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ ValidationError

Returns a new instance of ValidationError.



468
469
470
# File 'lib/ippon/validate.rb', line 468

def initialize(result)
  @result = result
end

Instance Attribute Details

#resultResult (readonly)

Returns the result object.

Returns:

  • (Result)

    the result object



466
467
468
# File 'lib/ippon/validate.rb', line 466

def result
  @result
end

Instance Method Details

#errorsArray<StepError | NestedError>

A shortcut for result.errors.

Returns:



475
476
477
# File 'lib/ippon/validate.rb', line 475

def errors
  @result.errors
end