I've used Phonelib gem to validate phone number in my models.
When I use Faker::PhoneNumber.phone_number for phone numbers during seed data creation, they don't pass the validation.
One such example is below:
You can either set Phonelib.extension_separator or Phonelib.extension_separate_symbols to use the "x" that Faker returns, or you can override the locale in Faker to change how the extension is returned.
I've used
Phonelib
gem to validate phone number in my models. When I useFaker::PhoneNumber.phone_number
for phone numbers during seed data creation, they don't pass the validation. One such example is below:I guess the whole point of
Faker
is to generate fake random things but is there any workaround for models with such validation?