feature: flag for `@IsDateString()` decorator to validate date without time
See original GitHub issueIt`s more feature request. I think it would be nice to have ability validate date string without time using @IsDateString() decorator. For example, ‘2000-07-26’, not ‘2000-07-26T00:00:01.967Z’. Cannot find how to do that not using @Matches() decorator.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:17 (7 by maintainers)
Top Results From Across the Web
flag for @IsDateString() to validate date without time
It`s more feature request. I think it would be nice to have ability validate date string without time using @IsDateString() decorator.
Read more >How to validate an array of Date with class validator?
Try this one: export class CopyMealsPlanDto { ...// Another array @IsDateString({}, { each: true }) dates: Date[]; }. Run code snippet
Read more >class-validator - npm
Allows use of decorator and non-decorator based validation. Internally uses validator.js to perform validation. Class-validator works on ...
Read more >Class Validator Date String - StackBlitz
IsISO8601 } from 'class-validator';. class Test {. @IsDateString({ strict: true } as any). dateString = '2019-09-03';. @IsISO8601().
Read more >typestack/class-validator - CD2H gitForager
Allows use of decorator and non-decorator based validation. ... If you do not want to have such properties on your object, pass special...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I create custom one.
@talski of course we can use regular expressions… basically we can use them for all validations, but I think the point of the creation of this library was to simplify this process