lib/phonelib/phone_analyzer_helper.rb in phonelib-0.7.0 vs lib/phonelib/phone_analyzer_helper.rb in phonelib-0.7.1
- old
+ new
@@ -30,10 +30,10 @@
end
# defines if to validate against single country or not
def passed_country(country)
code = country_prefix(country)
- if Core::PLUS_SIGN == @original[0] && code && !sanitized.start_with?(code)
+ if !Phonelib.ignore_plus && Core::PLUS_SIGN == @original[0] && code && !sanitized.start_with?(code)
# in case number passed with + but it doesn't start with passed
# country prefix
country = nil
end
country