@@ -6,6 +6,59 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
88
9+ ## [ 0.8.0] ( https://github.com/binary-butterfly/validataclass/releases/tag/0.8.0 ) - 2022-11-30
10+
11+ [ Full changelog] ( https://github.com/binary-butterfly/validataclass/compare/0.7.2...0.8.0 )
12+
13+ This release adds two new validators and a handful of new parameters to existing validators.
14+
15+ It also introduces two ** breaking changes** , which in practice shouldn't really affect anyone negatively, and one
16+ ** deprecation** of an existing validator parameter. See the changes below.
17+
18+ ### Added
19+
20+ - ` AllowEmptyString ` : New wrapper validator that accepts empty strings (by [ @TomasHalgas ] ). [ #91 ]
21+ - ` DiscardValidator ` : New validator that discards any input and always returns a predefined value. [ #94 ]
22+ - ` EmailValidator ` and ` RegexValidator ` : Add parameter ` allow_empty ` to allow empty strings (by [ @TomasHalgas ] ). [ #89 ]
23+ - ` EmailValidator ` : Add parameter ` max_length ` . [ #97 ]
24+ - ` DecimalValidator ` : Add parameter ` rounding ` to specify rounding mode (with a new default, see "Changed"). [ #99 ]
25+
26+ ### Changed
27+
28+ - ** Breaking change:** ` AnyOfValidator ` and ` EnumValidator ` are now ** case-sensitive** by default. [ #98 ]
29+ - The parameter ` case_insensitive ` is ** replaced** with a new parameter ` case_sensitive ` which defaults to True.
30+ - The old parameter is still supported for compatibility, but is now deprecated and will be removed in a future version.
31+ - If you have set ` case_insensitive=True ` before, you can simply remove this parameter now as this is the default now.
32+ - ** Breaking change:** ` DecimalValidator ` (and all subclasses) now uses ` decimal.ROUND_HALF_UP ` as default rounding mode. [ #99 ]
33+ - Until now, the rounding mode of the current decimal context was used, which defaults to ` decimal.ROUND_HALF_EVEN ` .
34+ - Use the ` rounding ` parameter to change this. To restore the old behavior and use the decimal context, set ` rounding=None ` .
35+
36+ ### Deprecated
37+
38+ - ` AnyOfValidator ` and ` EnumValidator ` : The parameter ` case_insensitive ` is now deprecated and will be removed in a future
39+ version. (See "Changed" above.) [ #98 ]
40+
41+ ### Testing
42+
43+ - Fix version incompatibility in test suite. [ #95 ]
44+ - ` AnyOfValidator ` : Add unit tests with an empty list for allowed values. [ #96 ]
45+
46+ ### New contributors
47+
48+ - [ @TomasHalgas ] made their first contributions in [ #89 ] and [ #91 ] .
49+
50+ [ #89 ] : https://github.com/binary-butterfly/validataclass/pull/89
51+ [ #91 ] : https://github.com/binary-butterfly/validataclass/pull/91
52+ [ #94 ] : https://github.com/binary-butterfly/validataclass/pull/94
53+ [ #95 ] : https://github.com/binary-butterfly/validataclass/pull/95
54+ [ #96 ] : https://github.com/binary-butterfly/validataclass/pull/96
55+ [ #97 ] : https://github.com/binary-butterfly/validataclass/pull/97
56+ [ #98 ] : https://github.com/binary-butterfly/validataclass/pull/98
57+ [ #99 ] : https://github.com/binary-butterfly/validataclass/pull/99
58+
59+ [ @TomasHalgas ] : https://github.com/TomasHalgas
60+
61+
962## [ 0.7.2] ( https://github.com/binary-butterfly/validataclass/releases/tag/0.7.2 ) - 2022-09-26
1063
1164[ Full changelog] ( https://github.com/binary-butterfly/validataclass/compare/0.7.1...0.7.2 )
0 commit comments