Part of twistar.validation View In Hierarchy
DBObject
.Line # | Kind | Name | Docs |
---|---|---|---|
195 | Method | __init__ | Constructor. |
202 | Method | add | No summary |
218 | Method | isEmpty | Returns True if there are any errors associated with any
properties, False otherwise. |
229 | Method | errorsFor | Get the errors for a specific property. |
241 | Method | __str__ | Return all errors as a single string. |
254 | Method | __len__ | Get the sum of all errors for all properties. |
errors.add('first_name', 'cannot
be empty')
will result in an error message of "First Name
cannot be empty" being stored for this property.Parameters | prop | The name of a property to add an error to. |
error | A string error to associate with the given property. |
True
if there are any errors associated with any
properties, False
otherwise.