t.validation : module documentation

Part of twistar

Package providing validation support for DBObjects.
Line # Kind Name Docs
9 Function presenceOf A validator to test whether or not some named properties are set. For those named properties that are not set, an error will be recorded in obj.errors.
26 Function lengthOf No summary
57 Function uniquenessOf A validator to test whether or not some named properties are unique. For those named properties that are not unique, an error will be recorded in obj.errors.
84 Class Validator A mixin class to handle validating objects before they are saved.
190 Class Errors A class to hold errors found during validation of a DBObject.
def presenceOf(obj, names, kwargs):
A validator to test whether or not some named properties are set. For those named properties that are not set, an error will be recorded in obj.errors.
ParametersobjThe object whose properties need to be tested.
namesThe names of the properties to test.
kwargsKeyword arguments. Right now, all but a message value are ignored.
def lengthOf(obj, names, kwargs):
A validator to test whether or not some named properties have a specific length. The length is specified in one of two ways: either a range keyword set with a range / xrange / list object containing valid values, or a length keyword with the exact length allowed.

For those named properties that do not have the specified length, an error will be recorded in obj.errors.

ParametersobjThe object whose properties need to be tested.
namesThe names of the properties to test.
kwargsKeyword arguments. Right now, all but message, range, and length values are ignored.
def uniquenessOf(obj, names, kwargs):
A validator to test whether or not some named properties are unique. For those named properties that are not unique, an error will be recorded in obj.errors.
ParametersobjThe object whose properties need to be tested.
namesThe names of the properties to test.
kwargsKeyword arguments. Right now, all but a message value are ignored.
API Documentation for twistar, generated by pydoctor at 2012-06-12 10:00:49.