Open hypnoboutique opened 2 years ago
While I'm down here... it would be AMAZING if the guessCountry method could be exposed for other validators to use.
eg. I'm using react-hook-form with Yup for validation. The schema is defined a few components up and I would like to use this package's methods to validate where I define the schema.
Because I can't access the guessCountry
method, I'm having to hold state at my form schema level and drill an error setter through to the PhoneInput, where I can use the (unusual) onChange args - data
, to be specific - to perform some basic length validation.
Sorry. Maybe I'll PR it if I get time 🤷
You can't enter enough digits for Vietnam to satisfy the expected format.
This means I cannot enter a valid Vietnamese phone number.
Try it here: https://bl00mber.github.io/react-phone-input-2.html
The expected format is:
There may well be others, I just stumbled upon this one.