I'm trying to add a validation rule to a text field, where if a separate checkbox in the form is checked, the field is required to be a non-empty string in order for the form to submit.
Here's a link to what I have so far: https://codesandbox.io/s/magical-hypatia-n7o5w
I need the final text input in the form ("tiger_type") to require a value entered only if the checkbox input with id 'tiger' is checked.
I'm new to react and react-hooks-form, so any pointers will be appreciated. Thanks in advance.