question: shared validators
See original GitHub issueIs it possible to do shared validators? For example build a DTO with class-validator for array, string, number validators that can be used in other places.
function(@Query('id') id:QueryNumberDto)
import { IsNumber, Max, IsNotEmpty } from 'class-validator';
import { Transform } from 'class-transformer'
export class id:QueryNumberDto {
@IsNumber()
@IsNotEmpty()
@Transform(value => Number(value))
(dynamic): Number;
}
something like that, that in error i can return a dynamic field
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Response Requirements & Validation
Custom validation is used when you need your respondent to answer a question in a specific way. For example, you may want them...
Read more >angular - How to share custom validators between modules
How to share custom validators between modules · Just remove PasswordValidator from both i.e. SignupModule and AuthModule instead add it in root ...
Read more >decorator information missing from shared project · Issue ...
I moved CreateLoginInput class to shared-lib project to make other projects consume input validation. When CreateLoginInput is included from ...
Read more >Proof-of-Work Proponents Question Validator Censorship ...
Proof-of-Work Proponents Question Validator Censorship as 59% of Staked Ethereum Is Held by 4 Companies. Prior to The Merge, Ethereum used to ...
Read more >Validate a Question in Qualtrics - YouTube
How to create validation on a question using Qualtrics survey software tool at Purdue University.
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
You can also create a new Decorator for your Validator, that calls the other decorators. In JS/TS decorators are just functions that are called.
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.