Skip to content

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

Open
@nsbarsukov

Description

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

Metadata

Assignees

No one assigned

    Labels

    P2This issue has medium prioritybugSomething isn't workingscope: phoneRelated to @maskito/phone

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions