good forst commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { IsEmail, IsString, Matches, MaxLength, MinLength } from 'class-validator';
|
||||
|
||||
export class SignupDto {
|
||||
@IsString()
|
||||
@MinLength(2)
|
||||
@MaxLength(80)
|
||||
tenantName!: string;
|
||||
|
||||
// Lowercase, alphanumeric + dashes, 2-40 chars, must start with a letter
|
||||
@IsString()
|
||||
@Matches(/^[a-z][a-z0-9-]{1,39}$/, {
|
||||
message:
|
||||
'tenantSlug must be 2-40 chars, start with a letter, and contain only lowercase letters, digits, and dashes',
|
||||
})
|
||||
tenantSlug!: string;
|
||||
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
@MaxLength(128)
|
||||
password!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user