From 1aab654d3958d709f77ce1f5de88f254bda71fa3 Mon Sep 17 00:00:00 2001 From: Mika Date: Fri, 20 Jun 2025 16:58:32 +0200 Subject: [PATCH] fix: update username validation to allow maximum 255 characters --- crates/backend/src/controller/user.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/backend/src/controller/user.rs b/crates/backend/src/controller/user.rs index dd3eac2..38d8306 100644 --- a/crates/backend/src/controller/user.rs +++ b/crates/backend/src/controller/user.rs @@ -13,8 +13,8 @@ pub fn setup(cfg: &mut actix_web::web::ServiceConfig) { #[derive(Deserialize, Validate, ToSchema)] pub struct CreateUser { - #[validate(length(min = 4))] - /// Username (minimum 4 characters) + #[validate(length(min = 4, max = 255))] + /// Username (minimum 4 characters, maximum 255 characters) /// TODO: Don't allow spaces, only alphanumeric characters and underscores username: String, /// Full name of the user