FormKit.Validators
index
/usr/local/share/webware/FormKit/Validators.py

# This file contains a library of subclasses of Validator
# These are the actual validator classes you'll use in your work

 
Classes
       
FormKit.BaseValidatorClasses.ValidatorConverter
CapitalizeAllWords
ConvertToInt
DollarAmountAsString
EmailAddress
ExactLength
FileUploaded
MaxLength
MinLength
MustChoose
NotEmpty
RequiredField
UpperAllChars

 
class CapitalizeAllWords(FormKit.BaseValidatorClasses.ValidatorConverter)
    Capitalizes each word in a string
 
 

 
class ConvertToInt(FormKit.BaseValidatorClasses.ValidatorConverter)
    

 
class DollarAmountAsString(FormKit.BaseValidatorClasses.ValidatorConverter)
    Checks that the value is a valid dollar amount 
(i.e. "10.95", "$1.50", "1", etc.) and converts the value to a string,
stripping the '$' if present.
 
 

 
class EmailAddress(FormKit.BaseValidatorClasses.ValidatorConverter)
    Checks the value to make sure it at least looks like a valid email address.
In normal mode it checks using a regular expression.  If you pass checkdns=1 to
the constructor, it will check that the domain exists.  This requires the 
pydns module from http://pydns.sf.net (Debian users: apt-get install python-dns)
 
  Methods defined here:
__init__(self, checkdns=0)

 
class ExactLength(FormKit.BaseValidatorClasses.ValidatorConverter)
     Methods defined here:
__init__(self, length)

 
class FileUploaded(FormKit.BaseValidatorClasses.ValidatorConverter)
    To requires user to upload a file with a FileField
 
 

 
class MaxLength(FormKit.BaseValidatorClasses.ValidatorConverter)
     Methods defined here:
__init__(self, maxlength)

 
class MinLength(FormKit.BaseValidatorClasses.ValidatorConverter)
     Methods defined here:
__init__(self, minlength)

 
class MustChoose(FormKit.BaseValidatorClasses.ValidatorConverter)
    

 
class NotEmpty(FormKit.BaseValidatorClasses.ValidatorConverter)
    

 
class RequiredField(FormKit.BaseValidatorClasses.ValidatorConverter)
     Methods defined here:
__init__(self, minlength)

 
class UpperAllChars(FormKit.BaseValidatorClasses.ValidatorConverter)
    Converts all characters in a string into caps