Additional validators
Overview¶
Path | PyPoE/shared/config/validator.py |
Version | 1.0.0a0 |
Revision | $Id: d9d1759ffa17c6e6a8716007ce6e18047e73bc73 $ |
Author | Omega_K2 |
Description¶
Additional validators for configobj and validate.
Validator Function Generators¶
Bases:
object
Class to create a dynamic validator for IntEnum classes
Parameters: value (object) – The value to validate Returns: the int enum instance if successfully validated or None Return type: IntEnum Raises: ValidateError
– if the the value can’t be validated
Parameters: - enum (
enum.IntEnum
) – base enum class for this validator - default (
enum.IntEnum
| int | None) – default attribute of the enum
Raises: TypeError
– if enum is not anenum.IntEnum
classTypeError
– if default parameter is of invalid type
- enum (
Validator Functions¶
Checks whether the value is a valid file path (and optionally whether it exists).
Parameters: Returns: the int enum instance if successfully validated or None
Return type: IntEnum
Raises: ValidateError
– if the the value can’t be validated
Checks whether the value is a valid directory path (and optionally whether it exists).
Parameters: Returns: the int enum instance if successfully validated or None
Return type: IntEnum
Raises: ValidateError
– if the the value can’t be validated
Agreement¶
See PyPoE/LICENSE