-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add skipIf
predicate option to decorator options
#1455
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Comments
aoi-umi
added
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
labels
Dec 19, 2021
|
i just want to ignore one validator not all |
6 tasks
NoNameProvided
changed the title
skip validator by option
feat: add Dec 15, 2022
skipIf
predicate option to decorator options
I believe this is the best proposal for improving validator conditionality. I think #1579 needs some work to resolve this (see my comments there), but this solution is my preferred approach to making specific decorators conditional. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
like this
#740
when submit is true, i want to skip IsDefined , but not minLength
for example:
{title: "111111111", submit: true} => valid
{title: undefined, submit: false} => valid
{title: "1", submit: false} => invalid(MinLength)
Proposed solution
add
skipIf
on theValidationOptions
The text was updated successfully, but these errors were encountered: