phone
phone copied to clipboard
Ruby library for phone number parsing, validation and formatting
This PR adds a simple configuration for GitHub Actions, seeing that #97 Travis stopped. Fixes #97 --- TODO after merge: - Drop the Travis webhook in Settings for this repo
Hi, could you please accept this change to add Canada to the list. Cheers Dave
``` [1] pry(main)> Phoner::Phone.parse('+1-309-456-7890'.freeze) FrozenError: can't modify frozen String: "+1-309-456-7890" from /bundler/ruby/2.7.0/gems/phone-1.2.3/lib/phone.rb:170:in `sub!' ``` This is on version 1.2.0. `parse()` could probably call `string.dup` to create its own internal mutable...
Perhaps a new CI provider would be a way forward.
Hi @carr, Thank you for this great gem, it's been really helpful in the code we write. I hope you've found my previous contributions to it useful. Is there any...
Does this gem supports the [E.164 standard](https://en.wikipedia.org/wiki/E.164)? I was using the [gem faker](https://github.com/faker-ruby/faker/blob/master/doc/default/phone_number.md#cell_phone_in_e164) and it returned some random numbers: - +17875064112680 (this is not valid) - +6789035122371 (this is valid)
China area code regex
I'm using `Phoner::Phone.parse(phone_number).format(:us)`. I didn't set the `default_country_code` so I got the error `Phoner::CountryCodeError (Must enter country code or set default country code)`. I already saw on method `parse` we...
Phoner::Country.find_by_country_isocode("kz") Traceback (most recent call last): 1: from (irb):12 NoMethodError (undefined method `detect' for nil:NilClass) Is Kazakhstan in your database? Also, here can I find list of supported countries?
E.g. ```ruby ```