Fix UUID Regex when normalizing serviceIds
This commit is contained in:
parent
08e5d15501
commit
be6ec5d347
1 changed files with 2 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
|||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// [47] to support v4 and v7 uuids
|
||||
const UUID_REGEXP =
|
||||
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
|
||||
/^[0-9A-F]{8}-[0-9A-F]{4}-[47][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
|
||||
|
||||
export const isValidUuid = (value: unknown): value is string => {
|
||||
if (typeof value !== 'string') {
|
||||
|
|
Loading…
Add table
Reference in a new issue