Is it possible to concatenate mask strategies?
Closed this issue · 2 comments
mf-lit commented
For example:
I need to generate "National Insurance Numbers", these must match the pattern:
AB123456C
Faker doesn't have direct support for this, but I'm hoping I could do it by using three mask strategies and concatenating the results.
- Generate two random letters
- Generate six random digits
- Generate one random digit
Is this possible? Thanks.
tsurowiec commented
you can use regexify
from faker with [A-Z]{2}[0-9]{6}[A-Z]
mf-lit commented
This worked perfectly. Thanks!