### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- admin »
- validator »

# object_validator

class `camelot.admin.validator.object_validator.``ObjectValidator`(admin, model, initial_validation=False)

  A validator class for normal python objects. By default this validator declares all objects valid. Subclass this class and overwrite it’s objectValidity method to change it’s behaviour.

  `isValid`(row)

    Verify if a row in a model is ‘valid’ meaning it could be flushed to the database

  `number_of_invalid_rows`()

    Returns: | the number of invalid rows in a model, as they have been verified

  `objectValidity`(entity_instance)

    Returns: | list of messages explaining invalid data

    empty list if object is valid

  `validate_all_rows`()

    Force validation of all rows in the model

  `validityDialog`(row, parent)

    Return a QDialog that asks the user to discard his changes or continue to edit the row until it is valid.

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- admin »
- validator »

Comments
blog comments powered by Disqus