diff --git a/lib/config/dl_config.rb b/lib/config/dl_config.rb index 362c12b..c5d393c 100644 --- a/lib/config/dl_config.rb +++ b/lib/config/dl_config.rb @@ -75,7 +75,7 @@ class DlConfig 'IN' => /(^[A-Z]{1}[0-9]{9}$)|(^[0-9]{9,10}$)/, # Format: 1Alpha+9Numeric or 9Numeric or 10Numeric 'IA' => /(^[0-9]{9}$)|(^[0-9]{3}[A-Z]{2}[0-9]{4})$/, # Format: 9Numeric or 3Numeric+2Alpha+4Numeric 'KS' => /(^([A-Z]{1}[0-9]{1}){2}[A-Z]{1}$)|(^[A-Z]{1}[0-9]{8}$)|(^[0-9]{9}$)/, # Format: 1Alpha+1Numeric+1Alpha+1Numeric+1Alpha or 1Alpha+8Numeric or 9Numeric - 'KY' => /(^[A_Z]{1}[0-9]{8,9}$)|(^[0-9]{9}$)/, # Format: 1Alpha+8Numeric or 1Alpha+9Numeric or 9Numeric + 'KY' => /(^[A-Z]{1}[0-9]{8,9}$)|(^[0-9]{9}$)/, # Format: 1Alpha+8Numeric or 1Alpha+9Numeric or 9Numeric 'LA' => /^[0-9]{1,9}$/, # Format: 1-9Numeric 'ME' => /(^[0-9]{7,8}$)|(^[0-9]{7}[A-Z]{1}$)/, # Format: 7Numeric or 7Numeric+1Alpha or 8Numeric 'MD' => /^[A-Z]{1}[0-9]{12}$/, # Format: 1Alpha+12Numeric diff --git a/lib/dl_validator/version.rb b/lib/dl_validator/version.rb index f29498c..9047320 100644 --- a/lib/dl_validator/version.rb +++ b/lib/dl_validator/version.rb @@ -1,3 +1,3 @@ module DlValidator - VERSION = '0.0.6' + VERSION = '0.0.7' end diff --git a/test/test_dl_validator.rb b/test/test_dl_validator.rb index 541cded..7b5adc6 100644 --- a/test/test_dl_validator.rb +++ b/test/test_dl_validator.rb @@ -62,6 +62,17 @@ class DlValidatorTest < Test::Unit::TestCase should 'return true for a nil drivers_license_state' do assert DlValidator.invalid?('123456', drivers_license_state=nil) end + + should 'return valid for Kentucky' do + license = 'k12345678' + assert DlValidator.valid?(license, 'KY') + end + + should 'return invalid for Kentucky' do + license = 'ka12345678' + assert !DlValidator.valid?(license, 'KY') + end + end context '.get_abbreviation_key' do