feat: 车牌号校验
This commit is contained in:
parent
200a58f370
commit
cd69f62768
@ -8,7 +8,7 @@ const validateLicensePlate = (plateNumber: string): boolean => {
|
|||||||
if (!plateNumber) {
|
if (!plateNumber) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const regularExpression = /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}(\u6302)?$/;
|
const regularExpression = /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
|
||||||
return regularExpression.test(plateNumber);
|
return regularExpression.test(plateNumber);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user