Can class-validator check two related data?
See original GitHub issueCan class-validator check two related data? For example
class Test {
@IsNumber()
a: number;
@IsNumber()
b: number;
}
If the b value range is determined based on the a value range, can I use class-validator to handle it?
In addition, can I get a complete Test class object in my custom decorator?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Is it possible to validate that one of 2 parameters are present ...
First, you must add a custom validation class (read document) and then define a custom decorator for that (read document). You can see...
Read more >Argument and Input validation - TypeGraphQL
Note that by default, the skipMissingProperties setting of the class-validator is set to true because GraphQL will independently check whether the params/fields ...
Read more >Validating nested objects with class-validator in NestJS
Today I have for you a quick and short article. Maybe it will help someone. I'm using class-validator... Tagged with nestjs, typescript, ...
Read more >class-validator - npm Package Health Analysis - Snyk
Based on project statistics from the GitHub repository for the npm package class-validator, we found that it has been starred 8,698 times, and...
Read more >Next Level Your Typescript Runtime Type Validation Using ...
This article aims to demonstrate a clean and easy way to validate data using Typescript class and class-validator decorators.
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

Yes you can Example is given in the README https://github.com/typestack/class-validator#custom-validation-decorators
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.