Skip to content

vin ​

Validates a VIN (Vehicle Identification Number) for USA vehicles.

Options ​

OptionTypeDefaultDescription
messagestringlocale defaultCustom error message

Playground ​

Valid values ​

ValueNotes
"1HGBH41JXMN109186"Valid Honda VIN

Invalid values ​

ValueReason
"1HGBH41JXMN109187"Fails check digit
"1HGBH41JXMN10918"Only 16 chars instead of 17

Notes ​

  • Empty string ("") always returns valid: true. Combine with notEmpty to require a value.
  • VIN is exactly 17 alphanumeric characters. Letters I, O, and Q are not used.
  • The 9th character is a check digit validated using a weighted sum algorithm.

Released under the MIT License.