Comments (2)
This is not limited to long numbers, but a general bug. Even the example on the Github page doesn't produce the correct result. It says:
PhonyRails will also check your model for a country_code method to use when normalizing the number. So '070-12341234' with country_code 'NL' will get normalized to '317012341234'.
But executing it yields the same error:
pry(main)> PhonyRails.normalize_number('070-12341234', country_code: 'NL')
=> "3107012341234"
from phony_rails.
1.9.3p385 :001 > PhonyRails::VERSION # => "0.4.2"
1.9.3p385 :002 > PhonyRails.normalize_number('070-12341234', country_code: 'NL') # => "317012341234"
Using phony (1.9.0)
from phony_rails.
Related Issues (20)
- Valid 260 area code number is reported as invalid
- Country code wrapped in brackets is not recognized HOT 3
- default_country_code based on relation HOT 2
- default_country_code overrides 00-prefix country code
- Cut new release 0.14.7 to include new extension removal logic HOT 1
- PhonyRails.default_country_code too intrusive in plausible_number? method
- Country code is re-added if phone number is wrong length HOT 8
- Problem with normalizing Estonian number HOT 2
- Some German numbers not passing plausible_numbers? without country_code HOT 3
- 0.4.11 was the latest release. However the new normalize_when_valid has been sitting here for a while... Release? HOT 2
- normalized_when_valid: true seems broken if there are two phone attributes HOT 4
- Plausible approves many invalid USA numbers HOT 1
- #phony_normalized cuts zero in the middle of the phone number HOT 1
- phony_rails how to Determine whether the mobile number has been formatted
- Number not recognized as plausible in Zambia HOT 1
- Phone number not correctly recognized as valid in Bosnia and Herzegovina
- Validates extension and then after normalize it fails validation
- plausible_number? is far too permissive HOT 6
- Samoa number not recognized HOT 1
- Phony Rails not respecting numbers with country codes in them when default country code is DE or AT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phony_rails.