pycerberus contains some basic validators already. You can use them as they are or use them as a basis for more specialized validators. Below you find a list of all included validators.
Bases: pycerberus.api.Validator
Return all keys defined by this specific validator class.
Return a message for a specific key. Implement this method if you want to avoid calls to messages() which might be costly (otherwise implementing this method is optional).
Bases: pycerberus.validators.string.StringValidator
A validator to check if an domain name is syntactically correct.
Return all keys defined by this specific validator class.
Return a message for a specific key. Implement this method if you want to avoid calls to messages() which might be costly (otherwise implementing this method is optional).
Bases: pycerberus.validators.domain.DomainNameValidator
A validator to check if an email address is syntactically correct.
Please note that there is no clear definition of an ‘email address’. Some parts are defined in consecutive RFCs, there is a notion of ‘string that is accepted by a MTA’ and last but not least a fuzzy ‘general expectation’ what an email address should be about.
Therefore this validator is currently extremly simple and does not handle internationalized local parts/domains.
These things can be implemented in derived validators
Return all keys defined by this specific validator class.
Return a message for a specific key. Implement this method if you want to avoid calls to messages() which might be costly (otherwise implementing this method is optional).
Bases: pycerberus.api.Validator
Apply a validator to every item of an iterable (like map). Also you can specify the allowed min/max number of items in that iterable.
Return all keys defined by this specific validator class.
Return a message for a specific key. Implement this method if you want to avoid calls to messages() which might be costly (otherwise implementing this method is optional).
Bases: pycerberus.api.Validator
Return all keys defined by this specific validator class.
Return a message for a specific key. Implement this method if you want to avoid calls to messages() which might be costly (otherwise implementing this method is optional).