- Implement
AsRegex
forstd::sync::LazyLock<Regex>
- Bug fix for nested issue with custom only running nested if outer passes
- Swap to using proc-macro-error-2 instead of proc-macro-error for Syn
- Bumped MSRV to 1.81 because of error naming changes.
- Add more ValidateRegex impl
- Fix multiple custom validation
- Fix nested error handling
- Fix regressions from the derive rewrite, some things are back to 0.16 (eg custom functions)
- Remove require_nested, use required and nested validators instead
- Always require
nested
on the field for nested validation
- Derive macro has been entirely rewritten
- Validation is now done through traits that you can implement
- Remove phone validator
- Remove automatic use of serde rename for fields name (temporary)
- Allow passing code/message to
required
- Add
does_not_contain
validator - Check email length before validating it
- Allow passing args to schema validator
- Implement HasLen for map/set types
- Remove
validator_types
from validator crate - Add ValidationErrors::errors_mut
- Ignore unsupported fields rather than erroring
- Allow passing arguments to custom functions
- Better
Display
implementation - Better parsing of schema validation function in derive
- Allow multiple schema-level validations
- Allow
length
andrange
validators to take a reference to a variable - Make validator work with
Option<Vec<_>>
- Support reference for length types
- Fix
phone
,unic
andcard
feature to actually work
- Add a
derive
feature so you don't need to addvalidator_derive
to yourCargo.toml
- Add a blanket Validate implementation for references
- Add
Required
andRequiredNested
validators
- Add
non_control_characters
validation
ValidationErrors::errors
andValidationErrors::field_errors
now use&self
instead ofself
- Move to edition 2018
- Change error type to allow use with nested validation
- Make validators work on
Cow
- Feature gate the card validator
- Fix credit card validation being incorrect in enum
- Add international phone number and credit card validation
- Re-design
ValidationError
andValidate
trait
- Errors in the proc macro attributes will now point to the exact place the error is
- Handle
Required
andRequiredNested
validators
- Update syn & quote
- Move to edition 2018
- Use literals in macros now that it's stable -> bumping minimum Rust version to 1.30
- Allow nested validation
- Make validators work on
Cow
- Update dependencies
- Feature gate the card validator
- Fix path for regex starting with
::
- Update syn and quote
- Support
Option<Option<T>>
types
- Fix path for custom validators starting with
::
- Update syn and quote
- Add international phone number and credit card derive
- Change generated code to make the new design of errors work
- Fix range validator not working on Option
- Update to serde 1.0
- Fix potential conflicts with other attributes
- Validators now work on
Option
field and struct/fields with lifetimes
- Add
contains
andregex
validator - BREAKING: change
Errors
type to be a newtype in order to extend it
- Remove need for
attr_literals
feature - Fix error when not having validation on each field
- Add struct level validation
- Add
must_match
validator