Apenas números ou string. Campo de entrada no React
onKeyPress={(e) => !/[0-9]/.test(e.key) && e.preventDefault()} // numbers only
onKeyPress={(e) => !/[a-zA-z]/.test(e.key) && e.preventDefault()} // alphabets only.
Jolly Jay