Add state search - for granularity & jmp-register

Denver Gingerich created

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.

Change summary

lib/tel_selections.rb | 1 +
1 file changed, 1 insertion(+)

Detailed changes

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(