Validation Classes

These classes are used by the Data Type Classes to provide validation. by default the data types only validate that the data is actually of that datatype, however you can add any validation you wish.

Base Validation Class

class AdvConfigMgr.config_validation.ValidationsBase[source]

This is the base object that all other validation objects shoudl be based on. it is pretty simple at this point and is mainly a framework for consistency.

validate(data)[source]

This is the main method for validation. This is called by the configuration manager and the data is passed to it. it should return that same data if it is validated, or raise an error or warning if not.

Raising an error will stop the processing, raising a warning will simply log the problem, and the developer can choose to poll the error queue and display the errors.

Parameters:data
Returns:

Pre-Configured Validation Classes

class AdvConfigMgr.config_validation.ValidationsBase[source]

This is the base object that all other validation objects shoudl be based on. it is pretty simple at this point and is mainly a framework for consistency.

validate(data)[source]

This is the main method for validation. This is called by the configuration manager and the data is passed to it. it should return that same data if it is validated, or raise an error or warning if not.

Raising an error will stop the processing, raising a warning will simply log the problem, and the developer can choose to poll the error queue and display the errors.

Parameters:data
Returns: