diff --git a/serde_valid/README.md b/serde_valid/README.md index d62b456..296f8ba 100644 --- a/serde_valid/README.md +++ b/serde_valid/README.md @@ -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) | @@ -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`] | diff --git a/serde_valid/src/lib.rs b/serde_valid/src/lib.rs index 37cf536..bb5b9e2 100644 --- a/serde_valid/src/lib.rs +++ b/serde_valid/src/lib.rs @@ -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) | @@ -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`] |