title: How to input only number in react-hook-form
body: <p>I'm using react-hook-form for my input components, but there is one problem. In some text field, for example, text field for validation that take only number, i don't know how to do that, with normal <code>textInput</code>, we can use regex, like</p>
  <pre><code> const [numberInput, setNumberInput] = useState(&quot;&quot;)
    function onTextChanged(value) {
      setNumberInput(value.replace(/[^0-9]/, &quot;&quot;)) 
    }
  </code></pre>
  <p>and put that function and hook value on <code>onTextChange</code> and <code>value</code> respectively , i tried same method above on react-hook-form, but it won't work! i still can input other character like &quot;+&quot; or &quot;-&quot;, of course using numeric keyboard</p>
  <p>So here is TextField component</p>
  <pre><code>export interface HTextFieldProps extends TextFieldProps {
    control: Control&lt;any&gt;
    name: string
    defaultValue?: string
  }
  
  /**
   * Describe your component here
   */
  export const HTextField = function HookformTextField(props: HTextFieldProps) {
    const { name, control, defaultValue = &quot;&quot;, ...restProps } = props
  
    return (
      &lt;Controller
        control={control}
        name={name}
        render={({ field: { onChange, value }, fieldState: { error } }) =&gt; (
          &lt;TextField
            {...restProps}
            onChangeText={onChange}
            value={value}
            defaultValue={defaultValue}
            error={(error &amp;&amp; error.message) as TxKeyPath}
          /&gt;
        )}
        defaultValue={defaultValue}
      /&gt;
    )
  }
  </code></pre>
  <p>Here is when i use this</p>
  <pre><code>         &lt;HTextField
              onChangeText={(value) =&gt; onTextChanged(value)}
              value={numberInput}
              name={&quot;times&quot;}
              control={control}
              autoCapitalize=&quot;none&quot;
              keyboardType={Platform.OS === &quot;android&quot; ? &quot;numeric&quot; : &quot;number-pad&quot;}
              returnKeyType=&quot;done&quot;
              inputStyle={INPUT_STYLE}
              required
            /&gt;
  </code></pre>
  <p>So how can i use only number in react-hook-form look like this, thank you a lots</p>