How to make a React Native TextInput accept only numbers and make it accept numbers 1 to 10 only?
For example, say I input 11, the value should automatically change into the maximum allowed, that is, 10.
And when I input 0, the value should automatically change into the minimum allowed, that is, 1.
As of now the only thing I have done are:
<TextInput
style={styles.input}
placeholder="Maximum of 10 passengers only"
maxLength={2}
keyboardType={"numeric"}
/>