Upgrading from react-hook-form 6 to 7.33

Viewed 15
inputRef={(ref: HTMLInputElement | null) => {
          if (ref) {
            register(ref, {
              required: true,
              pattern: /^[a-z'\-\s]+$/i
            });
            if (refInputName) refInputName.current = ref;
          }
        }}

How do I change this code, I'm new to the react-hook-form. Thanks

0 Answers
Related