Skip to content

Commit

Permalink
docs: update.
Browse files Browse the repository at this point in the history
  • Loading branch information
yassun7010 committed May 14, 2024
1 parent 310baa8 commit 0a9301a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions serde_valid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ assert!(s.validate().is_ok());

Serde Valid support standard validation based JSON Schema.

| Type | Serde Valid(validate derive) | Serde Valid(validate trait) | JSON Schema |
| Type | Serde Valid (validate derive) | Serde Valid (validate trait) | JSON Schema |
| :-----: | :----------------------------------- | :--------------------------- | :-------------------------------------------------------------------------------------------- |
| String | `#[validate(max_length = 5)]` | [`ValidateMaxLength`] | [maxLength](https://json-schema.org/understanding-json-schema/reference/string#length) |
| String | `#[validate(min_length = 5)]` | [`ValidateMinLength`] | [minLength](https://json-schema.org/understanding-json-schema/reference/string#length) |
Expand All @@ -64,7 +64,7 @@ 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(validate trait) |
| 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`] |
Expand Down
4 changes: 2 additions & 2 deletions serde_valid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
//!
//! Serde Valid support standard validation based JSON Schema.
//!
//! | Type | Serde Valid(validate derive) | Serde Valid(validate trait) | JSON Schema |
//! | Type | Serde Valid (validate derive) | Serde Valid (validate trait) | JSON Schema |
//! | :-----: | :----------------------------------- | :--------------------------- | :-------------------------------------------------------------------------------------------- |
//! | String | `#[validate(max_length = 5)]` | [`ValidateMaxLength`] | [maxLength](https://json-schema.org/understanding-json-schema/reference/string#length) |
//! | String | `#[validate(min_length = 5)]` | [`ValidateMinLength`] | [minLength](https://json-schema.org/understanding-json-schema/reference/string#length) |
Expand All @@ -64,7 +64,7 @@
//!
//! 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(validate trait) |
//! | 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`] |
Expand Down

0 comments on commit 0a9301a

Please sign in to comment.