lib/barometer/query/formats/postalcode.rb in barometer-0.9.1 vs lib/barometer/query/formats/postalcode.rb in barometer-0.9.2

- old
+ new

@@ -3,10 +3,10 @@ module Format # # eg. H0H 0H0 # class Postalcode < Base - def self.country_code(query); "CA"; end + def self.geo(query); {country_code: 'CA'}; end def self.regex # Rules: no D, F, I, O, Q, or U anywhere # Basic validation: ^[ABCEGHJ-NPRSTVXY]{1}[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1} # [ ]?[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[0-9]{1}$ /^[A-Z]{1}[\d]{1}[A-Z]{1}[ ]?[\d]{1}[A-Z]{1}[\d]{1}$/