Basically, input field should accept only 1 - 999
values
Input Field :
<input
type="number"
value={value}
onChange={this.props.onViltMaxUserChange}
min="0"
max="999"
/>
onChange :
onViltMaxUserChange = _.throttle(e => {
let { value, min, max } = e.target;
if (value !== '' && !(_.inRange(value, min, max))) return false
this.setState({ value: value });
}, 50);
But User is able to add ---- or ++++
onChange is not triggered when user inputs + or -
.
I Don't want to allow user to input these.
How can I do this ?