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

Belgium phone number are valid even if they can't be parsed for national display #435

Open
YonniRouelle opened this issue Nov 25, 2022 · 1 comment

Comments

@YonniRouelle
Copy link

When I tried to parse belgium phone numbers

const newPhoneNumber = parsePhoneNumberFromString(
    '047501020',
    'BE'
);

console.log(newPhoneNumber?.isValid()); // true

const newPhoneNumber = parsePhoneNumberFromString(
    '0475010203',
    'BE'
);

console.log(newPhoneNumber?.isValid()); // true

Two cases are returning true whereas in the first case 1 digit is missing to be valid.

I tried same thing with French and when 1 digit is missing, the isValid method return false.

@catamphetamine
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants