diff --git a/src/routes/pubnix/register/+page.server.ts b/src/routes/pubnix/register/+page.server.ts index 73feced..29f3f69 100644 --- a/src/routes/pubnix/register/+page.server.ts +++ b/src/routes/pubnix/register/+page.server.ts @@ -15,8 +15,10 @@ export const actions: Actions = { const BodyTypeSchema = Joi.object({ username: Joi.string() .required() - .alphanum() - .lowercase(), + .pattern( + /^[a-z_][a-z0-9_]{0,20}$/ + ) + .message("Invalid username ([A-Za-z0-9_])"), email: Joi.string().email().required(), ssh: Joi.string() .required()