Add `@MaxLength` validations to limit string field lengths in multiple DTOs, ensuring consistent data validation and integrity. Integrate `CreateApiKeyDto` in the API keys controller for improved type safety.
14 lines
241 B
TypeScript
14 lines
241 B
TypeScript
import { IsNotEmpty, IsString, MaxLength } from "class-validator";
|
|
|
|
export class UpdateConsentDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MaxLength(16)
|
|
termsVersion!: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MaxLength(16)
|
|
privacyVersion!: string;
|
|
}
|