[Zope3-checkins] SVN: Zope3/trunk/ Fixed issue 352.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 1 17:46:01 EST 2005


Log message for revision 29375:
  Fixed issue 352.
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/doc/TODO.txt
  U   Zope3/trunk/src/zope/app/form/interfaces.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2005-03-01 22:32:09 UTC (rev 29374)
+++ Zope3/trunk/doc/CHANGES.txt	2005-03-01 22:46:01 UTC (rev 29375)
@@ -495,6 +495,9 @@
 
     Bug Fixes
 
+      - Fixed issue #352: documentation for
+        zope.app.form.interfaces.IInputWidget.validate is wrong
+
       - Fixed issue #317: Relative links don't work in Page Template
 
       - Fixed issue #335 (debug layer does not work with Zope3-trunk)

Modified: Zope3/trunk/doc/TODO.txt
===================================================================
--- Zope3/trunk/doc/TODO.txt	2005-03-01 22:32:09 UTC (rev 29374)
+++ Zope3/trunk/doc/TODO.txt	2005-03-01 22:46:01 UTC (rev 29375)
@@ -92,9 +92,6 @@
 
 * 348: ZCML hides import errors 
 
-* 352: documentation for zope.app.form.interfaces.IInputWidget.validate is
-       wrong
-
 * 356: Copy and Paste does not handle exceptions raised by __setitem__ 
 
 * 360: MultiSelectWidget configured for ISet but creates list

Modified: Zope3/trunk/src/zope/app/form/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/form/interfaces.py	2005-03-01 22:32:09 UTC (rev 29374)
+++ Zope3/trunk/src/zope/app/form/interfaces.py	2005-03-01 22:46:01 UTC (rev 29375)
@@ -162,16 +162,19 @@
         """)
 
     def validate():
-        """Validate the widget data.
+        """Returns a valid value from the widget.
 
-        If there is no user input and the field is required, then a
+        This method returns the data of the field in the native Python
+        format. The value is also validated against the field's constraints.
+
+        If the field is required and no input was found, a
         ``MissingInputError`` will be raised.
 
-        If there is no user input and the field is not required, then
-        the field default value will be returned.
+        If the field is not required and no input was found, then return the
+        ``missing_value`` of the field.
 
-        A ``WidgetInputError`` is returned in the case of one or more
-        errors encountered, inputting, converting, or validating the data.
+        If validation errors occurred, then they are all collected in a new
+        ``WidgetInputError`` exception, which is raised.
         """
 
     def getInputValue():
@@ -179,8 +182,6 @@
 
         The widget must return a value that can be legally assigned to
         its bound field or otherwise raise ``WidgetInputError``.
-
-        See validate() for validation performed.
         """
 
     def applyChanges(content):



More information about the Zope3-Checkins mailing list