Skip to content

Commit

Permalink
docs: update validify examples in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gengteng committed Jan 6, 2024
1 parent 7d2bf69 commit 076027d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ use std::net::SocketAddr;
use tokio::net::TcpListener;
use validify::{Payload, Validate, Validify};
// Payload is required.(Added in validify 1.3.0)
#[derive(Debug, Validify, Deserialize, Payload)]
#[derive(Debug, Validify, Deserialize)]
pub struct Pager {
#[validate(range(min = 1.0, max = 50.0))]
pub page_size: usize,
Expand All @@ -180,7 +179,7 @@ pub async fn pager_from_query(Validated(Query(pager)): Validated<Query<Pager>>)
assert!((1..).contains(&pager.page_no));
}
// Payload is required.(Added in validify 1.3.0)
// Payload is now required for Validified. (Added in validify 1.3.0)
#[derive(Debug, Validify, Deserialize, Payload)]
pub struct Parameters {
#[modify(lowercase)]
Expand Down

0 comments on commit 076027d

Please sign in to comment.