Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

277 B
Raw Blame
import { ApiProperty } from '@nestjs/swagger'
import { Matches, IsNotEmpty } from 'class-validator'

const PROJECT_ID_REGEX = /^(?!.*--)[a-zA-Z0-9-]{12}$/

export class ProjectIdDto {
  @ApiProperty()
  @Matches(PROJECT_ID_REGEX)
  @IsNotEmpty()
  readonly projectId: string
}