Motivation: I wanted to create conditional rules for some fields inside a React form. I couldn’t get the one implemented by the library, so I created one.
Basic usage: field: isRequiredIf(shouldValidateField)("Field")
Implementation:
Motivation: I wanted to create conditional rules for some fields inside a React form. I couldn’t get the one implemented by the library, so I created one.
Basic usage: field: isRequiredIf(shouldValidateField)("Field")
Implementation: