title: how to do get react-phone-input-2 value by using react-hook-form in react
body: <p>I am getting TextField value on Submit, but not ReactPhoneInput value, how to get the value using react-hook-form</p>
  <pre><code>import ReactPhoneInput from &quot;react-phone-input-2&quot;
  import {TextField,Button}from &quot;@material-ui/core&quot;
  
  const {register, handleSubmit,formState: { errors }} = useForm()
  
  const getData= (data) =&gt; {
     console.log(data.username)
     console.log(data.username);
  }
  
  </code></pre>
  <p>form</p>
  <pre><code>&lt;form onSubmit={handleSubmit(getData)} &gt;
  
    &lt;TextField {...register(&quot;username&quot;)} /&gt;
  
     &lt;ReactPhoneInput
        inputExtraProps={{
          name: &quot;phone&quot;,
          required: true,
          autoFocus: true
        }}
  
        country={&quot;in&quot;}
         onlyCountries={[&quot;in&quot;]}                     
         countryCodeEditable={false}
          specialLabel={&quot;Player Mobile Number&quot;}
         rules={{ required: true }}
       /&gt;
  &lt;Button type='submit&gt;Submit&lt;/Button&gt; 
  &lt;/form&gt;
  </code></pre>