Validation¶
Validate a configuration value by converting it to a specific type.
These functions are used by staticconf.readers
and
staticconf.schema
to coerce config values to a type.
- staticconf.validation.build_list_type_validator(item_validator)[source]¶
Return a function which validates that the value is a list of items which are validated using item_validator.
- staticconf.validation.build_map_type_validator(item_validator)[source]¶
Return a function which validates that the value is a mapping of items. The function should return pairs of items that will be passed to the dict constructor.
- staticconf.validation.get_validators()[source]¶
Return an iterator of (validator_name, validator) pairs.