franckverrot / activevalidators

Collection of ActiveModel/ActiveRecord validators
https://rubygems.org/gems/activevalidators
MIT License
306 stars 49 forks source link

postal code fixes and improvements #81

Closed bcm closed 8 years ago

bcm commented 8 years ago
  1. remove exception for unknown postal code formats. in practical terms, raising an exception in this case is not useful when trying to validate the postal code of a model. since the list of known formats is not comprehensive, it's totally reasonable for a globally-used application to encounter countries that don't have known postal code formats. so when that happens, just accept whatever value was given.
  2. add postal code formats for GB, NZ and SG.

though the two sets of changes are not specifically related, they're so small that it's easier to include them in one pull request than to open two separate ones. hope you don't mind.

franckverrot commented 8 years ago

Thanks Brian!