bchavez / Bogus

:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Other
8.79k stars 499 forks source link

Fixes VIN sometimes has 18 character length #431

Closed skwasjer closed 9 months ago

skwasjer commented 2 years ago

The last appended random number segment of a VIN could sometimes yield an invalid VIN because the max allowed number value was 100000. This caused the returned VIN to have a length of 18 characters.

Without the fix, the new test case in this PR would produce an assertion exception:

Expected string with length 17, but found string "XTVJ5JFU2YBV100000" with length 18.
bchavez commented 9 months ago

Hello. Thank you for the pull request.

Your changes are published in Bogus v35.4.0:

Thanks again for the help. -Brian