Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose validator constraints to end-users using a new trait #238

Closed
wants to merge 8 commits into from

Commits on Apr 14, 2023

  1. Trait validation (Keats#225)

    * implemented validation trait for length
    
    * converted identation to spaces
    
    * changed the trait to not require HasLen
    
    * added macro for generating impls
    
    * implemented ValidateLength for some types
    
    * using trait validation instead of the function
    
    * added cfg for indexmap import
    
    * changed trait to require length
    
    * Revert "changed trait to require length"
    
    This reverts commit a77bdc9.
    
    * moved validation logic inside ValidateLength trait
    
    * added trait validation for required
    
    * added email trait validation
    
    * fixed trait validation for email
    
    * added range trait validation
    
    * fixed range trait
    
    * added url trait validation
    
    ---------
    
    Co-authored-by: Tilen Pintarič <tilen.pintaric@aviko.si>
    pintariching and Tilen Pintarič authored Apr 14, 2023
    Configuration menu
    Copy the full SHA
    4830561 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Feature: Add exclusive_min and exclusive_max to range validation (

    Keats#246)
    
    * feat(range): add exclusive minimum and exclusive maximum for `range` validation
    
    * test(range): add tests for `exc_min` and `exc_max` range validation
    
    * docs: add docs for `exc_min` and `exc_max` for `range` validation
    
    * chore: rename `exc_min`, `exc_max` to `exclusive_min`, `exclusive_max`
    
    * chore(validation.rs): get rid of `collide` function
    ivan-gj authored Apr 23, 2023
    Configuration menu
    Copy the full SHA
    6471bae View commit details
    Browse the repository at this point in the history

Commits on May 13, 2023

  1. Change some trait + cargo fmt

    Keats committed May 13, 2023
    Configuration menu
    Copy the full SHA
    61531d3 View commit details
    Browse the repository at this point in the history
  2. Remove phone feature and code

    Keats committed May 13, 2023
    Configuration menu
    Copy the full SHA
    897811a View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Configuration menu
    Copy the full SHA
    cbca88e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    803b7b1 View commit details
    Browse the repository at this point in the history
  3. Make collection types wrap the constraints in a different constraint …

    …kind
    
    This makes it possible for code consuming the constraints to know
    whether the type is used directly or if it is held in some kind of
    collection.
    kyrias committed May 26, 2023
    Configuration menu
    Copy the full SHA
    ecde4f4 View commit details
    Browse the repository at this point in the history
  4. Add tests for constaints trait

    kyrias committed May 26, 2023
    Configuration menu
    Copy the full SHA
    92b144d View commit details
    Browse the repository at this point in the history