13 lines
358 B
TypeScript
13 lines
358 B
TypeScript
import { Transform } from 'class-transformer';
|
|
import { IsEmail, IsOptional, MaxLength } from 'class-validator';
|
|
|
|
export class UpdateDocumentDeliverySettingsDto {
|
|
@IsOptional()
|
|
@Transform(({ value }) =>
|
|
typeof value === 'string' && value.trim() ? value.trim().toLowerCase() : null,
|
|
)
|
|
@IsEmail()
|
|
@MaxLength(320)
|
|
officeEmail?: string | null;
|
|
}
|