Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 12414)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 12415)
@@ -5,10 +5,12 @@
 ===================
 
+* Modify getWidgetsData so that we always get the same error format.
+
+* Validate all codes in university.
+
 * Catch traceback when creating an application slip with a corrupted
   image file.
 
 * Remove deprecated HTML and REST widgets and use html2dict instead.
-
-* Do not import codes with spaces.
 
 * UserProcessor: Check if imported roles do exist in the portal.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt	(revision 12414)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt	(revision 12415)
@@ -567,5 +567,5 @@
     title_prefix,code,title,--ERRORS--
     faculty,FAC1,Faculty 1,This object already exists. Skipping.
-    faculty,FAC 5,Faculty 5,code: must not contain spaces
+    faculty,FAC 5,Faculty 5,code: Invalid input
 
     >>> finished_file = dc_path + '/finished/newfaculties_zope.mgr.create.finished.csv'
Index: /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 12414)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 12415)
@@ -171,5 +171,5 @@
 
 #: Regular expressions to check id formats.
-check_id = re.compile(r"^[a-zA-Z0-9_-]{2,6}$").match
+check_id = re.compile(r"^[a-zA-Z0-9_-]{2,9}$").match
 
 def validate_id(value):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 12414)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 12415)
@@ -541,7 +541,7 @@
             content,
             'reg_number,firstname,student_id,sex,email,phone,state,date_of_birth,lastname,password,matric_number,--ERRORS--\r\n'
-            '1,Aaren,B123456,m,aa@aa.ng,1234,cleared,1990-01-03,Finau,mypw1,100001,reg_number: reg_number\r\n'
-            '2,Aaren,C123456,m,aa@aa.ng,1234,admitted,1990-01-04,Berson,mypw1,100000,matric_number: matric_number\r\n'
-            '1,Frank,F123456,m,aa@aa.ng,1234,,1990-01-06,Meyer,,100000,reg_number: reg_number; matric_number: matric_number\r\n'
+            '1,Aaren,B123456,m,aa@aa.ng,1234,cleared,1990-01-03,Finau,mypw1,100001,reg_number: Invalid input\r\n'
+            '2,Aaren,C123456,m,aa@aa.ng,1234,admitted,1990-01-04,Berson,mypw1,100000,matric_number: Invalid input\r\n'
+            '1,Frank,F123456,m,aa@aa.ng,1234,,1990-01-06,Meyer,,100000,reg_number: Invalid input; matric_number: Invalid input\r\n'
             '3,Uli,A123456,m,aa@aa.ng,1234,,1990-01-07,Schulz,,100002,This object already exists. Skipping.\r\n'
             )
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py	(revision 12414)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py	(revision 12415)
@@ -24,5 +24,5 @@
 from zope.formlib.form import (
     _widgetKey, WidgetInputError, ValidationError, InputErrors, expandPrefix)
-from zope.formlib.interfaces import IInputWidget
+from zope.formlib.interfaces import IInputWidget, ConversionError
 from zope.interface import Interface
 from zope.publisher.browser import TestRequest
@@ -100,14 +100,14 @@
             if not widget.hasInput():
                 continue
-
             try:
                 data[name] = widget.getInputValue()
             except ValidationError, error:
-                # convert field ValidationError to WidgetInputError
-                error = WidgetInputError(widget.name, widget.label, error)
+                error = ConversionError(u'Validation failed')
                 errors.append((name, error))
-            except InputErrors, error:
+            except WidgetInputError, error:
+                error = ConversionError(u'Invalid input')
                 errors.append((name, error))
-
+            except ConversionError, error:
+                errors.append((name, error))
     return errors
 
