Skip to content

Commit

Permalink
Fix. Ensure license plate validity.
Browse files Browse the repository at this point in the history
  • Loading branch information
woller committed Oct 14, 2024
1 parent e429d43 commit 94584a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/locales/da-DK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,4 +566,4 @@ da-DK:
- Ur
- Pung
vehicle:
license_plate: '[A-Z]{2}\d{5}'
license_plate: '[A-F]{2}\d{5}'
2 changes: 1 addition & 1 deletion test/test_da_dk_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def test_da_dk_counrty_code
end

def test_da_dk_license_plate
assert_match(/^[A-Z]{2}\d{5}$/, Faker::Vehicle.license_plate)
assert_match(/^(O[A-HJ-NPR-Z](?![BHBUCCCDDKDUEUKZMUYPSSUDUNVC])|[A-HJ-NPR-Z]{2})(\d{2,5})$/, Faker::Vehicle.license_plate)
end
end

0 comments on commit 94584a1

Please sign in to comment.