Skip to content

Commit

Permalink
chore: update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yassun7010 committed May 15, 2024
1 parent 325a33c commit e10df9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions serde_valid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Serde Valid support standard validation based JSON Schema.

In addition, [serde_valid::utils][module@crate::utils] provides a type of validation not described in the JSON schema specification.

| Type | Serde Valid (validate derive) | Serde Valid (validation function) |
| :-------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- |
| [Duration][`std::time::Duration`] | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] |
| [Duration][`std::time::Duration`] | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] |
| [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] |
| [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] |
| Type | Serde Valid (validate derive) | Serde Valid (validation function) |
| :------------------------------------------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- |
| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] |
| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] |
| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] |
| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] |

## Complete Constructor (Deserialization)

Expand Down
12 changes: 6 additions & 6 deletions serde_valid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
//!
//! In addition, [serde_valid::utils][module@crate::utils] provides a type of validation not described in the JSON schema specification.
//!
//! | Type | Serde Valid (validate derive) | Serde Valid (validation function) |
//! | :-------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- |
//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] |
//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] |
//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] |
//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] |
//! | Type | Serde Valid (validate derive) | Serde Valid (validation function) |
//! | :------------------------------------------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- |
//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] |
//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] |
//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] |
//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] |
//!
//! ## Complete Constructor (Deserialization)
//!
Expand Down

0 comments on commit e10df9c

Please sign in to comment.