Exception: Rasti::Form::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rasti/form/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, errors) ⇒ ValidationError

Returns a new instance of ValidationError.



50
51
52
53
# File 'lib/rasti/form/errors.rb', line 50

def initialize(scope, errors)
  @scope = scope
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



48
49
50
# File 'lib/rasti/form/errors.rb', line 48

def errors
  @errors
end

#scopeObject (readonly)

Returns the value of attribute scope.



48
49
50
# File 'lib/rasti/form/errors.rb', line 48

def scope
  @scope
end

Instance Method Details

#messageObject



55
56
57
# File 'lib/rasti/form/errors.rb', line 55

def message
  "Validation error: #{scope} #{JSON.dump(errors)}"
end