Package qanda :: Module validators :: Class Nonblank
[hide private]
[frames] | no frames]

Class Nonblank

source code

   object --+    
            |    
BaseValidator --+
                |
               Nonblank

Only allow non-blank strings (i.e. those with a length more than 0).
Instance Methods [hide private]
 
validate(self, value)
Is this value correct or of the correct form?
source code

Inherited from BaseValidator: __call__, convert

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

validate(self, value)

source code 

Is this value correct or of the correct form?

Should throw an exception if validations fails. Override in subclass if required.

Parameters:
  • value - value to be checked
Overrides: BaseValidator.validate
(inherited documentation)