lib/rasti/form/errors.rb in rasti-form-3.1.0 vs lib/rasti/form/errors.rb in rasti-form-3.1.1
- old
+ new
@@ -51,10 +51,18 @@
@scope = scope
@errors = errors
end
def message
- "Validation error: #{scope} #{JSON.dump(errors)}"
+ lines = ['Validation errors:']
+
+ errors.each do |key, value|
+ lines << "- #{key}: #{value}"
+ end
+
+ lines << scope.inspect
+
+ lines.join("\n")
end
end
end
\ No newline at end of file