Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 - Phone should accept incomplete phone number of selected country (even with strict=true) #1894

Open
nsbarsukov opened this issue Dec 16, 2024 · 0 comments
Labels
bug Something isn't working P2 This issue has medium priority scope: phone Related to @maskito/phone

Comments

@nsbarsukov
Copy link
Member

nsbarsukov commented Dec 16, 2024

Which package(s) are the source of the bug?

@maskito/phone

Description

strict=false βœ…

  1. Open https://maskito.dev/addons/phone/API?strict=false
  2. Focus
  3. Paste
+7 123

Textfield contains +7 123


strict=true ❌

  1. Open https://maskito.dev/addons/phone/API?strict=true
  2. Focus
  3. Paste
+7 123

Textfield still contains only +7.
Expected: textfield contains +7 123


Why ?

strict=true is only about attempts to enter phone number of another country (see [countryIsoCode] property).
Paste of incomplete phone number (with + & countryPrefix) of selected country should be accepted.


Pay attention ⚠️

Textfield contains +7 => Paste +7123 => Textfield contains +7 123
Textfield contains +7 => Paste 7123 (incomplete phone number without +) => Textfield contains +7 7123

Maskito version

3.2.0

@nsbarsukov nsbarsukov added bug Something isn't working P2 This issue has medium priority scope: phone Related to @maskito/phone labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 This issue has medium priority scope: phone Related to @maskito/phone
Projects
None yet
Development

No branches or pull requests

1 participant