lib/validate_zipcode/regex.rb in validate_zipcode-1.1.0 vs lib/validate_zipcode/regex.rb in validate_zipcode-1.1.1

- old
+ new

@@ -7,7 +7,37 @@ def self.BR(zipcode) match = zipcode =~ /^([0-9]{5}-[0-9]{3})$|([0-9]{8})$/ match == 0 ? true : false end + + def self.FR(zipcode) + match = zipcode =~ /^([0-9]{5})$/ + match == 0 ? true : false + end + + def self.IT(zipcode) + match = zipcode =~ /^([0-9]{5})$/ + match == 0 ? true : false + end + + def self.DE(zipcode) + match = zipcode =~ /^([0-9]{5})$/ + match == 0 ? true : false + end + + def self.ES(zipcode) + match = zipcode =~ /^([0-9]{5})$/ + match == 0 ? true : false + end + + def self.CN(zipcode) + match = zipcode =~ /^([0-9]{6})$/ + match == 0 ? true : false + end + + def self.JP(zipcode) + match = zipcode =~ /^([0-9]{3}-[0-9]{4})$|([0-9]{7})$/ + match == 0 ? true : false + end end end