From 5fe4706486aac3844538d158e8f99b94218ee0e4 Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Fri, 18 Feb 2022 11:58:45 -0800 Subject: [PATCH] Add state search - for granularity & jmp-register Note that this is not quite complete yet, since we need to pull in the STATE_MAP stuff used elsewhere to make it work properly. But it will at least work for every state/province/territory that is not Quebec for now, which is way better than nothing. Quebec users will get the same fallbacks they had before. --- lib/tel_selections.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 6c26612..2c15068 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -170,6 +170,7 @@ class TelSelections npaNxx: [:NpaNxx, /\A(?:[2-9][0-9]{2}){2}\Z/], npaNxxx: [:NpaNxxx, /\A(?:[2-9][0-9]{2}){2}[0-9]\Z/], zip: [:PostalCode, /\A\d{5}(?:-\d{4})?\Z/], + state: [:State, /\A[a-zA-Z]{2}\Z/], localVanity: [:LocalVanity, /\A~(.+)\Z/] }.each do |k, args| klass = const_set( -- 2.45.2