Open
Description
In US/CA, the final digit of a VIN is a check digit.
Faker currently just picks a random digit and finishes the VIN with that. As a result, about 70% of the time faker generates invalid VINs.
# Faker does not always generate valid VINs :(
def vin_factory(_attrs) do
vin = Faker.Vehicle.vin()
vin
|> Vin.valid_vin_string?()
|> case do
:ok -> vin
{:error, _} -> build(:vin)
end
end
Metadata
Metadata
Assignees
Labels
No labels