Check out example codes for "html to only allow thai characters". It will help you in understanding the concepts better.

Code Example 1

<input type="text" id="firstName"  onkeypress="return (event.charCode >= 65 && event.charCode <= 90) || (event.charCode >= 97 && event.charCode <= 122) || (event.charCode >= 48 && event.charCode <= 57)" />

Learn ReactJs, React Native from akashmittal.com