Merge branch 'main' of https://github.com/gengteng/axum-valid
This commit is contained in:
@@ -4,6 +4,10 @@ This crate provides a `Valid` type that can be used in combination with `Json`,
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo add axum-valid
|
||||||
|
```
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use validator::Validate;
|
use validator::Validate;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
@@ -29,4 +33,4 @@ pub async fn get_page_by_json(
|
|||||||
assert!((1..=50).contains(&pager.page_size));
|
assert!((1..=50).contains(&pager.page_size));
|
||||||
assert!((1..).contains(&pager.page_no));
|
assert!((1..).contains(&pager.page_no));
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user