Disable the editing of the country code #106
Closed
adrielschmitz
started this conversation in
Ideas
Replies: 1 comment
-
This is a common approach used by many other phone input components, and people are familiar with it. Anyway, I believe you can achieve this behavior by remembering the country with a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to suggest an option to disable the user from editing the country code. After the user deletes the entire number, he can also edit the country code. In theory, he should know what he is doing and, after deleting everything, type it back in. However, there is no doubting the user's ability. Mainly because if the country code is not entered, the validation returns true. To mitigate this, I had to add an additional layer of verification to see if the number has the country code (in my case, I check if the country is br and if it has 55 before it). With this in mind, I think it makes sense to have an option for the user to not edit the country code and only change it when selecting a new country in the country selection.
Beta Was this translation helpful? Give feedback.
All reactions