fix: update username validation to allow maximum 255 characters

This commit is contained in:
Mika 2025-06-20 16:58:32 +02:00
parent 8881e4d7eb
commit 1aab654d39

View file

@ -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