[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Validators - StringBaseValidator.py:1.3

Marius Gedminas mgedmin@delfi.lt
Mon, 24 Jun 2002 11:38:31 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Validators
In directory cvs.zope.org:/tmp/cvs-serv5664

Modified Files:
	StringBaseValidator.py 
Log Message:
Made StringBaseValidator.validate accept Unicode strings


=== Zope3/lib/python/Zope/App/Formulator/Validators/StringBaseValidator.py 1.2 => 1.3 ===
 
 from Zope.App.Formulator.Validator import Validator
-from types import StringType
+from types import StringTypes
 
   
 class StringBaseValidator(Validator):
@@ -35,7 +35,7 @@
         
     def validate(self, field, value):
         """ """
-        if not isinstance(value, StringType):
+        if not isinstance(value, StringTypes):
             self.raiseError('illegalValue', field)
         value = value.strip()
         if field.getValue('isRequired') and value == "":