So I'm creating a database with Laravel and seeding it, and I ran into an issue where it generates a phone number as follows: (635) 889-5802 x45134
. This causes issues by exceeding the desired length of the database column.
So my questions are:
x#####
? I'm looking around and can't find a good explanation, best guess is an internal organization extension. x#####
from being attached to the number on generation? I feel like this should be an option. If not it sounds like my best options would be a custom provider or a regex filter to remove these values. x####
is commonly used to indicate a phone extension. From looking at the source code for the phone number provider, there's no option to remove the extension so you'd have to do so yourself.
However, you may want to consider reading Falsehoods Programmers Believe About Phone Numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With