--- a/src/pyams_form/form.py Fri May 18 15:55:52 2018 +0200
+++ b/src/pyams_form/form.py Wed May 23 15:06:41 2018 +0200
@@ -390,7 +390,7 @@
data[form] = form_data
errors = errors + form_errors
if errors or self.errors:
- return self.get_ajax_errors()
+ return self.get_ajax_errors(errors)
try:
result = self.createAndAdd(data)
except ValidationError as error:
@@ -505,7 +505,7 @@
data[form] = form_data
errors = errors + form_errors
if errors or self.errors:
- return self.get_ajax_errors()
+ return self.get_ajax_errors(errors)
# update form content
translate = self.request.localizer.translate
try: