actually fix pubnix uppercase username thing

This commit is contained in:
Arya 2023-05-23 14:56:59 +08:00
parent f4ffef07f4
commit fd2c1b98ba
Signed by: arya
GPG Key ID: 842D12BDA50DF120

View File

@ -15,8 +15,10 @@ export const actions: Actions = {
const BodyTypeSchema = Joi.object({ const BodyTypeSchema = Joi.object({
username: Joi.string() username: Joi.string()
.required() .required()
.alphanum() .pattern(
.lowercase(), /^[a-z_][a-z0-9_]{0,20}$/
)
.message("Invalid username ([A-Za-z0-9_])"),
email: Joi.string().email().required(), email: Joi.string().email().required(),
ssh: Joi.string() ssh: Joi.string()
.required() .required()