All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- add nstr validator #63
- support Python 3.10 ~ 3.12 #61
- fix some typing hints #61
- fix int validator default max value #62
- add bytes validator
- add typing hints for public APIs
- support T.enum with enum class parameter
- add union validator. #36
- support dynamic dict validator. #38
- add timedelta validator. #39
- add enum validator. #40
- add slug validator. #41
- add fqdn validator. #41
- support nested model class. #7520d96
- str validator accept int objects, and support match parameter. #38
- dict validator support slim parameter. #47
- add maxlen parameter to dict, url, and create_re_validator. #a64640
- replaced custom enum validator with builtin enum validator.
create_enum_validator
functon is deprecated, use builtin enum validator instead.
- fields function support dict schema, eg: T.dict({...}). #32
- Change behavior from deepcopy to copy when use dict and list validator without inner validator, improve performance. #31
- Deprecate Python 3.4, Add Python 3.8 to CI #33
- Support pure Python mode. #30
- Add ModelInvalid exception, support get error datails when modelclass invalid. #28 #28
- Support control validator accept and output type, add
object
parameter. #22 #24 - Add
accept_object
parameter tostr
validator. #24 - Handle invalid values more flexibly. #23 #25
- Add
invalid_to
andinvalid_to_default
parameter. #25 - Add
field
andvalue
attributes to ValidrError #25
validator
decorator now useaccept
andoutput
to control data types,string
argument is deprecated. #24
- Fix list unique check slow #17,#21
- Fix install error when system encoding not UTF-8 #19
- Add
is_string
andvalidator
attributes to validator
- Support set and frozenset as schema slice keys
- Support create model with dict as position argument
- Fix copy custom validator
- A Python based schema and validators, easy to write schema with fewer mistakes
- Model class, similar to dataclass in python 3.7
- Not compatible with previous schema!
This is the last version of old schema syntax.
- A JSON String based schema and validators, works for an internal web application