forked from Yara724/api
Add case identity filters and description validation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsNotEmpty, IsOptional, IsString } from "class-validator";
|
||||
import { IsOptional, IsString } from "class-validator";
|
||||
import { Types } from "mongoose";
|
||||
import { AddPlateDto } from "src/profile/dto/user/AddPlateDto";
|
||||
import { StepsEnum } from "src/Types&Enums/blame-request-management/steps.enum";
|
||||
@@ -51,8 +51,13 @@ export class FirstPartyFileDto {
|
||||
}
|
||||
|
||||
export class DescriptionDto {
|
||||
@ApiProperty({ description: "Accident description (required for all types)" })
|
||||
desc: string;
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
"Accident description. Optional for THIRD_PARTY; CAR_BODY requires at least 100 non-whitespace characters.",
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
desc?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "CAR_BODY only. Ignored for THIRD_PARTY.",
|
||||
@@ -94,10 +99,13 @@ export class DescriptionDto {
|
||||
* front-end can display them consistently regardless of blame type.
|
||||
*/
|
||||
export class DescriptionV4Dto {
|
||||
@ApiProperty({ description: "Accident description" })
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
"Accident description. Optional for THIRD_PARTY; CAR_BODY requires at least 100 non-whitespace characters.",
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
desc: string;
|
||||
desc?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user