PackageTrack
Sign in Get early access

validator

Common validation functions (email, url, length, ...) and trait - to be used with `validator_derive`

0.21.0 61M downloads/mo #1092 most downloaded on crates.io Keats/validator

What this package is like to depend on

Last release 27 days ago

27 Jul 2026

Release timing varies

gaps range from 5 weeks to 1.5 years

Nearly every release is documented

notes for 24 of 26 stable releases

1 version withdrawn

withdrawn after publishing

10 years old

27 releases · first in 2016

1 release in the last 12 months

see the full history below

Release timeline

27 releases · Dec 2016 to Jul 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 27
  1. 0.21.0 27 Jul 2026
    Release notes
    • Replace dep proc-macro-error2 with proc-macro-error3
    • Edition 2024
    Open source →
  2. 0.20.0 20 Jan 2025
    Release notes
    • Implement AsRegex for std::sync::LazyLock<Regex>
    • Bug fix for nested issue with custom only running nested if outer passes
    • Support Deserialize for ValidationErrors
    Open source →
  3. 0.19.0 03 Nov 2024
    Release notes
    • 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
    Open source →
  4. 0.18.1 11 Apr 2024
    Release notes
    • Fix multiple custom validation
    • Fix nested error handling
    Open source →
  5. 0.18.0 05 Apr 2024
    Release notes
    • 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
    Open source →
  6. 0.17.0 04 Mar 2024
    Release notes
    • 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)
    Open source →
  7. 0.16.1 15 Jun 2023

    Nothing published for this version

  8. 0.16.0 25 Jul 2022
    Release notes
    • Allow passing code/message to required
    • Add does_not_contain validator
    • Check email length before validating it
    Open source →
  9. 0.15.0 03 May 2022
    Release notes

    Prepare for 0.15 release

    Open source →
    Release notes
    • 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
    Open source →
  10. 0.14.0 29 Jun 2021
    Release notes

    Bump versions (#163)

    Open source →
    Release notes
    • Allow passing arguments to custom functions
    • Better Display implementation
    • Better parsing of schema validation function in derive
    Open source →
  11. 0.13.0 22 Mar 2021
    Release notes
    • Allow multiple schema-level validations
    Open source →
  12. 0.12.0 27 Nov 2020
    Release notes
    • Allow length and range validators to take a reference to a variable
    • Make validator work with Option<Vec<_>>
    • Support reference for length types
    • Fix phone, unic and card feature to actually work
    Open source →
  13. 0.11.0 09 Sep 2020
    Release notes
    • Add a derive feature so you don't need to add validator_derive to your Cargo.toml
    Open source →
  14. 0.10.1 09 Jun 2020
    Release notes
    • Add a blanket Validate implementation for references
    • Add Required and RequiredNested validators
    Open source →
  15. 0.10.0 20 Oct 2019
    Release notes
    • Add non_control_characters validation
    Open source →
  16. 0.9.0 13 Jul 2019
    Release notes
    • ValidationErrors::errors and ValidationErrors::field_errors now use &self instead of self
    • Move to edition 2018
    Open source →
  17. 0.8.0 19 Sep 2018
    Release notes
    • Change error type to allow use with nested validation
    Open source →
  18. 0.7.1 27 Jul 2018
    Release notes
    • Make validators work on Cow
    Open source →
  19. 0.7.0 29 May 2018
    Release notes
    • Feature gate the card validator
    Open source →
  20. 0.6.3 05 Dec 2017
    Release notes
    • Fix path for custom validators starting with ::
    Open source →
  21. 0.6.2 08 Nov 2017
    Release notes
    • Fix credit card validation being incorrect in enum
    Open source →
  22. 0.6.1 08 Nov 2017 withdrawn
    Release notes
    • Add international phone number and credit card validation
    Open source →
  23. 0.6.0 12 Aug 2017
    Release notes
    • Re-design ValidationError and Validate trait
    Open source →
  24. 0.4.0 30 Jan 2017
    Release notes
    • Validators now work on Option field and struct/fields with lifetimes
    Open source →
  25. 0.3.0 17 Jan 2017
    Release notes
    • Add contains and regex validator
    • BREAKING: change Errors type to be a newtype in order to extend it
    Open source →
  26. 0.2.0 17 Jan 2017
    Release notes
    • Remove need for attr_literals feature
    • Fix error when not having validation on each field
    • Add struct level validation
    • Add must_match validator
    Open source →
  27. 0.1.0 28 Dec 2016

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive