add is_uuid

This commit is contained in:
Luk 2025-04-11 16:49:55 +08:00
parent 82ff175d24
commit dd3cedcd23

View File

@ -471,4 +471,8 @@ module.exports = {
}
return array
},
is_uuid (uuid) {
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(unid)
},
}