Switch onblur and onchange in the React project form validation mode

How to perform onblur check first in form check, switch to onchange check if there is an error, and then change to onblur check if there is no error during onchange.Now I’m using react-hook-form +Yup. React-hook-form can determine the mode at the beginning, but I can’t switch other modes during execution.