object_validator¶
- class camelot.admin.validator.object_validator.ObjectValidator(admin, model=None)[source]¶
A validator class for normal python objects. By default this validator declares all objects valid. Subclass this class and overwrite it’s validate_object method to change it’s behaviour.
- get_first_invalid_row()[source]¶
Returns: the row number of the first invalid row (where the first row has number 0)
Get the validator for another Class :param cls: the Class for which to get the validator :return: an ObjectValidator instance
- isValid(row)[source]¶
Verify if a row in a model is ‘valid’ meaning it could be flushed to the database