react-intl-tel-input
react-intl-tel-input copied to clipboard
Number Validation
Hi,
Currently I'm able to type text also in the input box. I want to restrict the typing to numbers only. I can show error messages when text is typed, but it would be great if I can restrict the typing only to number. As I'm using this by installing, I need this restriction from your source only.
@patw0929 we can add an option to restrict only numbers as a custom attribute to <IntlTelInput>.
Any thoughts on this?
Does this option exists? I can't find it anywhere and can't validate on methods available. Is it possible to avoid input change on onPhoneNumberChange, checking if "value" is a number? I can't find a way to block non-numbers being typed.
@patw0929 @muriloSanto @superhit0 Hi Guys, Did anyone find out a way to have numbers only.
Not yet, we can validate that is not a valid filling to our form validation, but cannot avoid to have the user to type only numbers.
I ended up using a numeric keypad UI that sets the value on the input, and blurring focus events manually on the input.
Hello any one who found the solution to this issue? I am trying to do this in https://www.npmjs.com/package/react-intl-tel-input. I want the user to allow only numbers in this field