Postal Codes only generate first 3 values

when generating Postal Codes, it only generates the first 3 values (eg. H2B). there should be 6. (eg. H2B 3W9). spaces are optional and i don’t count them because they get stripped… just wondering if there’s a broken parser somewhere… and if it can be fixed! :slight_smile:

this is repeatable using any output format, btw.

TIA!

1 Like

I’m noticing the same - trying to generate data for Canada. Addresses look great except for this issue: Postal Code should be 6 characters like “A1A 2B2”… I am only getting the “A1A” part.

I’m using this formula/field spec which gives you a full (random last 3 chars) Canadian Postal Code:

{
name: ‘postal_code’,
type: ‘Postal Code’,
formula: “concat( this, ’ ', random(0,9), ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’[random(0,25)], random(0,9) )”
}

It also generates invalid Postal Codes. I have the following:

city: City
province: State (abbrev) = British Columbia
postalCode: Postal Code

which only generates province values of “BC”, therefore all valid Postal Codes should start with the letter “V” and match the generated city. However, I get “H9G” (Dollard-des-Ormeaux, QC), instead of “V0K 1V0” (Lillooet, BC).

Valid Postal Codes for BC

Thanks for that workaround. However, be aware that the letters D, F, I, O, Q or U are not valid (because they are hard for OCR software to deal with), so you should delete those in your formula, like so:

concat( this, ' ', random(0,9), 'ABCEGHJKLMNPRSTVWXYZ'[random(0,19)], random(0,9) )

Unfortunately, the first 3 generated characters don’t match the province and city.

Just wanted to add that I’m having the same issue with Dutch postcodes. They should be formatted like “1234 AA” (the space is optional) but the letters are not being generated, only the four digits. (I’m using a formula workaround too.)

Hello,

Could you please tell me how to generate Germany address in this tool, as I am able to generate only US address.

Field name : address
type: street address

Field name : zippostcode
type: Postal code

Field name : city
type: city

Field name : country
type: country code for (Germany : DE)

Field name : state
type: state

In above scenario, I am getting Germany related valid values for zippostcode,city, country,state except address in which I am getting US values for street address.

Test data generated :

[{

“address”: “3 Larry Crossing”, >>>>>>>>>>>>>> This is US address and I want to generate Germany address
“zippostcode”: “24118”,
“city”: “Kiel”,
“country”: “DE”,

}]

This post was flagged by the community and is temporarily hidden.

@mockaroo - this is still happening, do you know of a fix please?

I’m also having a really strange issue where JSON Array nested postcodes aren’t being affected by the country unless it’s also nested within the JSON Array to the same level and not hidden. Any ideas?

1 Like