Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize bugs #47

Closed
jensb1 opened this issue Jun 28, 2012 · 3 comments
Closed

Normalize bugs #47

jensb1 opened this issue Jun 28, 2012 · 3 comments

Comments

@jensb1
Copy link

jensb1 commented Jun 28, 2012

1.9.3p125 :020 > Phony.plausible?("010")
=> true
1.9.3p125 :021 > Phony.normalize("010")
=> "1[#<Phony::NationalCode:0x007ffc2efc53a0 @national_splitter=#<Phony::NationalSplitters::Fixed:0x007ffc2efc53f0 @SiZe=3, @zero=nil>, @local_splitter=#<Phony::LocalSplitters::Fixed:0x007ffc2d5d3d70 @Format=[3, 14]>, @normalize=true>]"

1.9.3p125 :022 > Phony.plausible?("+460000")
=> true
1.9.3p125 :023 > Phony.normalize("+460000")
=> "46[#<Phony::NationalCode:0x007ffc2efe2f40 @national_splitter=#<Phony::NationalSplitters::Variable:0x007ffc2efe3120 @SiZe=nil, @zero="0", @mapped_ndc_min_length=2, @mapped_ndc_max_length=5, @ndcs={2=>["99"], 3=>["112", "116", "118", "900", "939", "944"], 4=>["1177"], 5=>["11414"]}>, @local_splitter=#<Phony::LocalSplitters::Fixed:0x007ffc2e97f338 @Format=[3, 13]>, @normalize=true>, #<Phony::NationalCode:0x007ffc2efe2cc0 @national_splitter=#<Phony::NationalSplitters::Variable:0x007ffc2efe2e50 @SiZe=3, @zero="0", @mapped_ndc_min_length=1, @mapped_ndc_max_length=2, @ndcs={1=>["7", "8"], 2=>["10", "11", "13", "16", "18", "19", "20", "21", "23", "26", "31", "33", "35", "36", "40", "42", "44", "46", "54", "60", "63", "90", "70", "71", "72", "73", "74", "76"]}>, @local_splitter=#<Phony::LocalSplitters::Fixed:0x007ffc2d3a6bb0 @Format=[18]>, @normalize=true>]"

@floere
Copy link
Owner

floere commented Jul 1, 2012

Hi Jens, thanks for your feedback.
It is helpful for me to also know the context in which this was a problem, so I know how people are using Phony.
Anyway, these problems have been fixed in version 1.7.5.
Cheers!

@floere floere closed this as completed Jul 1, 2012
@jensb1
Copy link
Author

jensb1 commented Jul 1, 2012

We use Phony to validate and normalize all user input phone numbers so the numbers in the database are in the exact same format.

@floere
Copy link
Owner

floere commented Jul 3, 2012

Thanks for the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants