README.md in phony_rails-0.7.2 vs README.md in phony_rails-0.7.3
- old
+ new
@@ -89,9 +89,14 @@
or correct country code:
validates_plausible_phone :phone_number, :country_code => 'AU'
+You can validate against the normalized input as opposed to the raw input:
+
+ phony_normalize :phone_number, as: :phone_number_normalized, :default_country_code => 'US'
+ validates_plausible_phone :phone_number, :normalized_country_code => 'US'
+
### Display / Views
In your views use:
<%= "311012341234".phony_formatted(:format => :international, :spaces => '-') %>