Skip to content

Commit

Permalink
change function name
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Nov 11, 2023
1 parent 9b45c13 commit 78e023b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/kitsune-core/src/service/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use zxcvbn::zxcvbn;
const MIN_PASSWORD_STRENGTH: u8 = 3;

#[inline]
fn additional_username_check(value: &str, ctx: &RegisterContext) -> garde::Result {
fn conditional_ascii_check(value: &str, ctx: &RegisterContext) -> garde::Result {
if ctx.allow_non_ascii {
return Ok(());
}
Expand Down Expand Up @@ -87,7 +87,7 @@ pub struct RegisterContext {
pub struct Register {
/// Username of the new user
#[garde(
custom(additional_username_check),
custom(conditional_ascii_check),
length(min = 1, max = 64),
pattern(r"^[\p{L}\p{N}\.]+$")
)]
Expand Down

0 comments on commit 78e023b

Please sign in to comment.