diff --git a/server/src/application/dto/create-env.dto.ts b/server/src/application/dto/create-env.dto.ts index 16d5bc24a3..117b6b768a 100644 --- a/server/src/application/dto/create-env.dto.ts +++ b/server/src/application/dto/create-env.dto.ts @@ -1,11 +1,12 @@ import { ApiProperty } from '@nestjs/swagger' -import { IsNotEmpty, IsString, Length } from 'class-validator' +import { IsNotEmpty, IsString, Length, Matches } from 'class-validator' export class CreateEnvironmentDto { @ApiProperty() @IsNotEmpty() @IsString() @Length(1, 64) + @Matches(/^[a-zA-Z_][a-zA-Z0-9_]*$/) name: string @ApiProperty()