Notable changes to Validatron are tracked in this file.
The format is based on the Keep A Changelog 1.0.0 spec. Releases may be found on GitHub and are tagged with their release number in the Git repository. Release numbers follow the Semantic Versioning 2.0.0 format. As a reminder, this format uses major, minor, and patch numbers with the following form:
v1.2.3-test
^ ^ ^ ^
| | | |
| | | pre-release tag
| | patch
| minor
major
These are incremented according to the following rules:
- MAJOR versions contain backwards-incompatible changes.
- MINOR versions contain new backwards-compatible features.
- PATCH versions contain backwards-compatible fixes.
Added for new features. Changed for changes in existing functionality. Deprecated for soon-to-be removed features. Removed for now removed features. Fixed for any bug fixes. Security in case of vulnerabilities.
When creating a new release in GitHub, please copy the [Unreleased]
section to a new versioned
section and use it for the release's notes, in addition to verifying that version numbers are
updated throughout the repository.
Error::Structured
is now backed by aBTreeMap
for consistent ordering.- Custom Function and Predicate validators no longer report the full module path in errors.
my::nested::validators::check_foo
will now be keyed ascheck_foo
in the resulting error report.
- Merging
Error::Structured
withError::Structured
is now recursive. - Merging
Error::Structured
withError::Unstructured
now creates anError::Structured
with anerrors
key for unstructured errors.
- Added optional support for
IndexMap
andIndexSet
with theuse-indexmap
feature.
- Better error messages for inbuilt validators
std::containers::HashSet
now implementsValidate
along with the other stdlib containers.- Added
option_min
andoption_max
field attribute validators.
- Breaking Change Using a literal string in macro annotations will now be interpreted as an
expression. This makes it possible to inject values by running functions and using types such as
Some(42)
with comparison operators. To inject string literals into macro attributes you will now now need to escape the literal quotes like so:#[validatron(equal = "\"Foo\"")]
- Initial release of
Validatron
- enums are now supported in their various forms
- added the
predicate
field attribute validator for functions that return bool - rename
ErrorBuilder::at_*
functions toErrorBuilder::try_at_*
- added new
ErrorBuilder::at_*
functions which will construct errors at the given location