[Mpuls-commits] r1908 - wasko/branches/2.0/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Mar 8 10:57:20 CET 2010


Author: torsten
Date: 2010-03-08 10:57:20 +0100 (Mon, 08 Mar 2010)
New Revision: 1908

Modified:
   wasko/branches/2.0/mpulsweb/lib/validators.py
Log:
* mpulsweb/lib/validators.py (StringTooLong): Deleted. Not used anymore.


Modified: wasko/branches/2.0/mpulsweb/lib/validators.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/validators.py	2010-03-08 09:56:07 UTC (rev 1907)
+++ wasko/branches/2.0/mpulsweb/lib/validators.py	2010-03-08 09:57:20 UTC (rev 1908)
@@ -34,26 +34,6 @@
     allow_extra_fields = True
     filter_extra_fields = False
 
-
-class StringTooLong(formencode.validators.FancyValidator):
-
-    messages = {
-        'invalid_length': (u'Bitte geben Sie einen Text mit maximal %(max)i'
-                           u' Zeichen an.'),
-        }
-
-    def __init__(self, max=80):
-        self.maxlength = max
-
-    def _to_python(self, value, state):
-        return value.strip()
-
-    def validate_python(self, value, state):
-        if not value is None and len(value) > self.maxlength:
-            raise formencode.Invalid(self.message("invalid_length", state,
-                                                  max=self.maxlength),
-                                     value, state)
-
 class DateOrder(FormValidator):
 
     """



More information about the Mpuls-commits mailing list