-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
da-DK license plates #3010
base: main
Are you sure you want to change the base?
da-DK license plates #3010
Conversation
Could you also add screenshots of using this in the console ( |
Co-authored-by: Stefanni Brasil <[email protected]>
vehicle: | ||
license_plate: '[A-Z]{2}[0-9]{5}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just remembered that the generator for license_plate
uses the numerify
and letterify
helpers by default:
https://github.com/faker-ruby/faker/blob/46130d9212932c5ad3e5523413ef2189937f55af/lib/faker.rb#L53 and
The other locale files use these helpers for generating random numbers and letters (including the vehicle english version). Let's follow the pattern for consistency:
vehicle: | |
license_plate: '[A-Z]{2}[0-9]{5}' | |
vehicle: | |
license_plate: '??#####' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @woller just checking in on the comment above. Apologies for missing the helper in the first place. Thank you!
Motivation / Background
This Pull Request has been created because it was not possible to generate valid Danish license plates. It adds the simplest possible license plates consisting of 2 letters and 5 digits. It follows the rules laid out on the Danish Wikipedia.
Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
If you're proposing a new generator or locale: