Skip to content

US Phone Number 7 Digit formatting #347

@paulresdat

Description

@paulresdat

Hi,

I've noticed that a 7 digit US phone number mask is not implemented in the current repository, so I forked it and implemented it for my project. I would like to add this feature to the repository but of course want to open an issue first to discuss it.

Basically the 10 digit formatting mask works for most occasions. However sometimes a 7 digit number works for data because the area code is implied. Example: Alaska has 907 as an area code for the whole state and so when people write numbers down, and yes even in business practice, they will leave off the area code to imply the 907 area code. This input mask does not accommodate for those instances where this is important.

Right now I've just added the mask to the main us-phone.js file where the phone length < 8 digits, then format it as '000-0000'. I've built and run it and have it linked to my repository and it works great for every phone number in there. I'd like to contribute and add it to the repo.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions