I try to do it like so, but it does nothing...
import {useForm, FormContext} from 'react-hook-form';
const formMethods = useForm({mode: 'onSubmit'});
const {triggerValidation} = formMethods;
triggerValidation('myFieldName');
return (
<FormContext {...formMethods}>
//here are my form fields, one of which has the key of 'myFieldName'
</FormContext>
);
onChangeof one input (actuallyonChangeof a wrapper -Controller), to enforce the validation of another input. But regardless, it doesn't work even within theuseEffect..