diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/vehicle.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/vehicle.js b/lib/vehicle.js index 43f4248c..82b6e37f 100644 --- a/lib/vehicle.js +++ b/lib/vehicle.js @@ -83,11 +83,16 @@ var Vehicle = function (faker) { * @method faker.vehicle.vin */ self.vin = function () { - return faker.random.arrayElement(faker.definitions.vehicle.vin); + return ( + faker.random.alphaNumeric(10) + + faker.random.alpha({ count: 1, upcase: true }) + + faker.random.alphaNumeric(1) + + faker.random.number({ min: 10000, max: 100000}) // return five digit # + ).toUpperCase() }; self.vin.schema = { - "description": "Generates a VIN number.", + "description": "Generates a valid VIN number.", "sampleResults": ["YV1MH682762184654", "3C7WRMBJ2EG208836"] }; |
