CEC-5085: update digit check (#465)

This commit is contained in:
Tristan Timblin
2023-10-10 11:20:12 -07:00
committed by GitHub
parent 7d2e335a76
commit 0f1886463e

View File

@@ -9,7 +9,7 @@ const TYPE_VIN = "vin";
* @returns {boolean}
*/
function isVIN(vin) {
var re = new RegExp("^[A-HJ-NPR-Z\\d]{8}[\\dX][A-HJ-NPR-Z\\d]{2}\\d{6}$");
var re = new RegExp("^[A-HJ-NPR-Z0-9]{8}[0-9X][A-HJ-NPR-Z0-9]{2}[0-9]{6}$");
return vin.match(re)
}