File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -573,9 +573,11 @@ validate(user, {
573
573
There is also a special flag ` always: true ` in validation options that you can use. This flag says that this validation
574
574
must be applied always no matter which group is used.
575
575
576
- ## Validation validateIf
576
+ ## Validation option validateIf
577
577
578
- If you want to validate that condition by object, you can use validation validateIf.
578
+ If you want an individual validaton decorator to apply conditionally, you can you can use the option ` validateIf ` available to all validators.
579
+ This allows more granular control than the ` @ValidateIf ` decorator which toggles all validators on the property, but keep in mind that
580
+ with great power comes great responsibility: Take care not to create unnecessarily complex validation logic.
579
581
580
582
``` typescript
581
583
class MyClass {
You can’t perform that action at this time.
0 commit comments