More flexible subdomain validation

This commit is contained in:
Tom Moor
2022-10-26 07:23:33 -04:00
parent 808eb540a7
commit fe3e8d3830

View File

@@ -62,9 +62,9 @@ class Team extends ParanoidModel {
@IsLowercase
@Unique
@Length({
min: 4,
min: 2,
max: 32,
msg: "subdomain must be between 4 and 32 characters",
msg: "subdomain must be between 2 and 32 characters",
})
@Is({
args: [/^[a-z\d-]+$/, "i"],