iro/validate.py
branchdevel
changeset 125 19b3f383c9ce
parent 118 e16c0250c974
child 126 1ac2439a68b5
--- a/iro/validate.py	Mon Jan 30 06:44:39 2012 +0100
+++ b/iro/validate.py	Mon Jan 30 06:51:28 2012 +0100
@@ -7,6 +7,7 @@
 from .error import ValidateException
 
 def vBool(value, field):
+    '''Validator for boolean values'''
     t=[True, 1, "true", "True", "TRUE"]
     f=[False, 0, "false", "False", "FALSE"]
     if value in t:
@@ -18,6 +19,7 @@
 
 
 def vHash(value,field,minlength=None,maxlength=None):
+    '''Validator for hash values'''
     if not re.match(r'^[a-f0-9]*$', value.lower()):
         raise ValidateException(field=field)
     if minlength and len(value)<minlength: