IsDate behaviour
Hello, I have sent the following date as part of a JSON object:
"DataIscrizione": "2010-10-10T00:00:00.000Z",
The desciption of the property is the following:
@ApiModelProperty()
// @IsDate({ message: "La data deve essere valida" })
@Column({ nullable: true })
DataIscrizione: Date;
if i set the IsDate the validation is wrong.
If i remove the date is being persisted to DB.
I'm using mySql, and NestJs
use IsDateString
Hi @andreanta!
It's not clear for me what is your exact problem, but probably @19majkel94 is right, if you want to verify that the received property is a valid date string then you need to use the @IsDateString decorator.
I will go ahead and close this question. Feel free to continue the discussion if we haven't answered your problem.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.