patw0929 / react-intl-tel-input

Rewrite International Telephone Input in React.js. (Looking for maintainers, and PRs & contributors are also welcomed!)
https://patw0929.github.io/react-intl-tel-input/
MIT License
284 stars 220 forks source link

Validation always fails #360

Open pkuznetsovdev opened 4 years ago

pkuznetsovdev commented 4 years ago

I'm trying to add a controlled phone input component, but the validation of any phone number always fails

Expected Behavior

Validation should pass

Current Behavior

image

Steps to Reproduce

Link to codesandbox: https://codesandbox.io/s/react-intl-tel-input-formik-dmqeq?file=/src/App.jsx

Environment

Detailed Description

  1. I' ve tried these values for the input: '+18008008008', '+1 8008008008', '(800) 800-8008', '+1 800 8008008'. No result.
  2. https://stackoverflow.com/a/61354770 the provided example doesn't work too