Skip to content

Commit

Permalink
docs: update.
Browse files Browse the repository at this point in the history
  • Loading branch information
yassun7010 committed Jun 20, 2024
1 parent 0f8aafd commit 3366c4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion serde_valid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ If you want to return multiple errors in the use custom validation method, you c
```rust
use serde_valid::Validate;

fn user_validation(_val: &i32) -> Result<(), Vec<serde_valid::validation::Error>> { // <-- Just change the return type from `Result<(), Error>` to `Result<(), Vec<Error>>` !!
// Just change the return type from `Result<(), Error>` to `Result<(), Vec<Error>>` !! 🚀
fn user_validation(_val: &i32) -> Result<(), Vec<serde_valid::validation::Error>> {
Ok(())
}

Expand Down
3 changes: 2 additions & 1 deletion serde_valid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@
//! ```rust
//! use serde_valid::Validate;
//!
//! fn user_validation(_val: &i32) -> Result<(), Vec<serde_valid::validation::Error>> { // <-- Just change the return type from `Result<(), Error>` to `Result<(), Vec<Error>>` !!
//! // Just change the return type from `Result<(), Error>` to `Result<(), Vec<Error>>` !! 🚀
//! fn user_validation(_val: &i32) -> Result<(), Vec<serde_valid::validation::Error>> {
//! Ok(())
//! }
//!
Expand Down

0 comments on commit 3366c4f

Please sign in to comment.