class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

feature: A parameter for isDateString

Open yanmarinich opened this issue 2 years ago • 1 comments

Description

The problem is ORM level like prisma which has DateTime type so string like 2023-09-25 is valid for class-validator but invalid for Prisma which leads to exception "Invalid value for argument startsAt: premature end of input. Expected ISO-8601 DateTime."

Proposed solution

Add an extra parameter something like isDateTime which checks if a string has time.

yanmarinich avatar Sep 05 '23 16:09 yanmarinich

Face the same problem.

recallwei avatar Nov 12 '23 15:11 recallwei