fix: update username validation to allow maximum 255 characters
This commit is contained in:
parent
8881e4d7eb
commit
1aab654d39
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue