Skip to content

Commit 3945a1a

Browse files
authored
chore: Update to validator 0.20 (#4235)
1 parent d3a8244 commit 3945a1a

File tree

3 files changed

+21
-51
lines changed

3 files changed

+21
-51
lines changed

Cargo.lock

Lines changed: 19 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/postgres/axum-social-with-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serde = "1.0.140"
1919
serde_with = { version = "2.0.0", features = ["time_0_3"] }
2020
time = "0.3.11"
2121
uuid = { version = "1.1.2", features = ["serde"] }
22-
validator = { version = "0.16.0", features = ["derive"] }
22+
validator = { version = "0.20.0", features = ["derive"] }
2323

2424
# Auxilliary crates
2525
anyhow = "1.0.58"

examples/postgres/axum-social-with-tests/src/http/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static USERNAME_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"^[0-9A-Za
2424
#[derive(Deserialize, Validate)]
2525
#[serde(rename_all = "camelCase")]
2626
pub struct UserAuth {
27-
#[validate(length(min = 3, max = 16), regex = "USERNAME_REGEX")]
27+
#[validate(length(min = 3, max = 16), regex(path = USERNAME_REGEX))]
2828
username: String,
2929
#[validate(length(min = 8, max = 32))]
3030
password: String,

0 commit comments

Comments
 (0)