Exception: Formalism::Form::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/formalism/form/validation_error.rb

Overview

When trying to get ‘#result` from unsuccessful outcome

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



9
10
11
12
# File 'lib/formalism/form/validation_error.rb', line 9

def initialize(errors)
	@errors = errors
	super "Outcome has errors: #{errors.to_a}"
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/formalism/form/validation_error.rb', line 7

def errors
  @errors
end