input text allow only numbers and dot javascript
xxxxxxxxxx
// see if value contains only number and .
// if so, updates state
const handlePrice = value => { if (/^\d*\.?\d*$/.test(value)) setConfirmationInfo(prevState => ({ prevState, price: value }));}
https://sbsharma.com/allow-only-digits-to-enter-in-the-html-input/