MCPcopy Create free account
hub / github.com/chunshand/qdev / isLicensePlate

Function isLicensePlate

admin/src/utils/validate.ts:80–84  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

78
79/** 判断是否为车牌(兼容新能源车牌) */
80export const isLicensePlate = (str: string) => {
81 const reg =
82 /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/
83 return reg.test(str)
84}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected