forked from Shared/esg
Added car by motor
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsString, Length, Matches } from 'class-validator';
|
||||
|
||||
export class CarByMotorRequestDto {
|
||||
@ApiProperty({ example: '4311402422', description: 'Owner national code (10 digits)' })
|
||||
@IsString()
|
||||
@Length(10, 10)
|
||||
@Matches(/^\d{10}$/, { message: 'nationalCode must be exactly 10 digits' })
|
||||
nationalCode!: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: '147H0403219',
|
||||
description: 'Vehicle motor/engine number',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
motorNo!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user