lib/rasti/form/errors.rb in rasti-form-1.0.1 vs lib/rasti/form/errors.rb in rasti-form-1.0.2
- old
+ new
@@ -23,17 +23,18 @@
end
class ValidationError < StandardError
- attr_reader :errors
+ attr_reader :scope, :errors
- def initialize(errors)
+ def initialize(scope, errors)
+ @scope = scope
@errors = errors
end
def message
- "Validation error: #{JSON.dump(errors)}"
+ "Validation error: #{scope} #{JSON.dump(errors)}"
end
end
end
\ No newline at end of file