chore: first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsNotEmpty, IsOptional, IsString, Matches, MaxLength } from "class-validator";
|
||||
|
||||
export class CreateDomainDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
@MaxLength(255)
|
||||
@Matches(/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/, { message: "Domain name must be a valid domain format" })
|
||||
@ApiProperty({ description: "The name of the domain", example: "example.com" })
|
||||
name!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@MaxLength(1000)
|
||||
@ApiProperty({ description: "The notes of the domain", example: "This is a test domain" })
|
||||
notes?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user