Skip to content

fix: isPhoneNumber decorator ignores the region parameter #1702

Open
@Motii1

Description

@Motii1

Description

It seems that isPhoneNumber function ignoring region argument when phone number with calling code is passed.

Everything is okay when I am passing number without calling code for example:

isPhoneNumber('793921111', 'US') // false

but when I am passing region and number with calling code it seems that region is ignored and calling code is treated as region parameter:

isPhoneNumber('+48793921111', 'US') // true

note: 793921111 is valid polish number

Expected behavior

region parameter is not ignored when number with calling code is passed as first argument

Actual behavior

region parameter is ignored when number with calling code is passed as first argument

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: fixedIssues with merged PRs, but not released yet.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions