Skip to content

balPhoneNumber works only for 9 character long numbers (excluding country code) #73

@FilipMarkovski

Description

@FilipMarkovski

[balPhoneNumber]: Adapt pipe to handle any amount of characters for phone number

Detailed description

We have an issue where the phone numbers that we have in our db are 7 characters long (excluding country code). Because they are of an insufficient number of characters, we don't see the phone number at all.

That is made clear by the regex being used in the source code.
It's expecting:

  • ([1-9]\d) - A 2-digit number starting with 1-9
  • (\d{3}) - A 3-digit number
  • (\d{2}) - A 2-digit number
  • (\d{2}) - Another 2-digit number
  • (.*) - Any remaining characters

Which means that the minimum is 9 characters.

Steps to reproduce the issue

  1. Have a phone number like: 41,1234567
  2. Use it in the template with balPhoneNumber pipe
  3. You'll see that it's not displayed

Additional information

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions