-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite derive macro implementation (#262)
* Rewrite derive macro implementation * Add better error handling * Add new types to validator macro * Add empty files in tokens module * Removed i32 tests for length * Fix email to pass tests * fix length validation trait to work with u64 only * Add credit card token generation to macro * Add url token generation to macro * Add ValidateIp trait * Add ip token generation to macro * Remove unneeded import * Export ValidateIp trait from main crate * Add tests for ValidateIp macro * Add non control character token generation to macro * Add test for range with enums * Add range token generation to macro * Add required token generation to macro * Fix ValidationErrors merge function * Move contains trait to contains.rs * Add ValidateContains trait and fix tests * Add ValidateContains and DoesNotContain traits to macro * Add must match token generation to macro * Add regex token generation * Add custom validation token generation to macro * Add custom validation with arguments to macro * Add custom validation with args with contexts * Add custom validation recommit * Fix custom validation to work without lifetimes * Change custom validation to use closures * Fix tests for custom validation * Change custom validation to implement FnOnce and add tests * Remove code used for experementing * Remove unneeded code * Remove unused imports * Add schema with arguments and fix tests * Impl ValidateLength trait for Option types * Fix impls for ValidateRange * Fix duplicate use statements * Fix tests and add Option impls for Contains * Implement ValidateUrl traits for specific types * Implement ValidateEmail traits for specific types * Fix some tests and warnings * Add regex trait for validation * Fix to pass tests in validator lib * Fix range validation trait to pass tests * Update and remove unneeded dependencies * Add ValidateNested trait * Fix custom and nested validation * Fix Regex validator to work with OnceCell and OnceLock * Fix derive macro to support all the arguments * Remove unneeded functions and fix tests * Remove validator_types crate and fix tests * Update CI workflow * Fix custom to be used in nested validations * Fix custom validation to use context * Add custom nested validation with args test * Fix validation to use Validation trait * Remove conflicting trait * Fixed tests and remove ValidateContext trait * Fix nested validation * Fix custom args test * Add `nest_all_fields` attribute * Add better error handling and start fixing UI tests * Pass almost all tests * Add skip_on_field_errors attribute to schema * Remove rust beta channel from workflow * Use proc_macro_error instead of darling diagnostics feature * Conditionally run UI tests * Fix ci.yml * Fix ci.yml * Remove UI test for wrong type on range * Change trait impls to be consistent * Run cargo clippy --fix * Replace if else with match * Remove cargo-expand leftovers * Replace underscore with `#[allow(unused)]` * Add support for multiple schema validations * Remove serde original field name test
- Loading branch information
1 parent
df6e5f5
commit 283a00a
Showing
115 changed files
with
3,829 additions
and
3,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
[workspace] | ||
members = [ | ||
"validator", | ||
"validator_derive", | ||
"validator_types", | ||
"validator_derive_tests" | ||
] | ||
resolver = "2" | ||
members = ["validator", "validator_derive", "validator_derive_tests"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
use_small_heuristics = "max" | ||
use_small_heuristics = "Max" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.