All notable changes to valify will be documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
RegexValidator- validates a value(str) against a regular expression.- new tests(76 total)
to_json_schema()- converts the valify Validator/Schema into a standard description that other tools can understand- 14 new tests(76 total)
Schema.from_example()— automatically generates a Schema from sample data by inferring validator types- Supports all built-in types: str, int, float, bool, email, dict, list
- Nested dict values produce nested schemas recursively
- List values infer item validator from first element
- 8 new tests (62 total)
- Documentation support through Sphinx and made the site live at readthedocs.
- Nested schema support —
Schemanow inherits fromValidatorand can be used as a field value inside anotherSchema - 4 new tests for nested schema validation (54 total)
OptionalValidator— makes any field optional with a default valueListValidator— validates every item in a listEnumValidator— value must be one of a fixed set of choices- 12 new tests (50 total)
- Full type hints across all modules (exceptions, validators, schema)
- mypy compatibility — passes strict type checking
StringValidator— validates strings with optional min/max lengthIntValidator— validates integers with optional min/max valueFloatValidator— validates floats with optional min/max valueBoolValidator— validates booleans with optional string coercionEmailValidator— validates email address formatSchema— validates dictionaries against a set of validators- Custom exception hierarchy:
ValifyError,ValidationError,RequiredFieldError,SchemaError - 38 tests covering all validators and schema behaviour