title: Allow to type only letters OR only numbers
body: <p>I'm developing app in React native and would like to allow user to type into input only letters or only numbers, so if first character is letter then user wouldn't be able to type any number after that, and opposity if first character is number then user wont be able to type any letter after that. Actually have no idea how to even start it, I guess best would be probably to check first character with regex and then based on this disable typing letters/numbers but not sure how to do so.</p>
  
  <pre><code>(/[a-zA-Z]/).test(this.state.myValue.charAt(0)) ? "disable typing numbers" : "disable typing letters"
  </code></pre>
  
  <p>my TextInput looks like this:</p>
  
  <pre><code>&lt;TextInput
   onChangeText={e=&gt; this.handleInput(e), "myValue"}
   value={this.state.myValue}
   /&gt;
  
  handleInput(value, key) {
   /^(?:[A-Za-z]+|\d+)$/.test(value) ? "block number" : "block letter"
  
   this.setState({[key]: value)}
  }
  </code></pre>