Skip to content

Commit a88aeca

Browse files
committed
regex fixed
1 parent 670e301 commit a88aeca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/customDecorator/vmId.decorator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from 'class-validator';
66

77
const VERIFICATION_METHOD_ID_REGEX =
8-
/^did:hid:(testnet:)?[a-zA-Z0-9]{32,}#[a-zA-Z0-9\-]+$/;
8+
/^did:hid:(?:[-a-zA-Z0-9]{1,10}:)?(?:[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[-.%a-zA-Z0-9]{1,128}|[A-Za-z0-9.-]+)(?:#[A-Za-z0-9.-]+)?$/;
99

1010
export function ValidateVerificationMethodId(
1111
validationOptions?: ValidationOptions,

0 commit comments

Comments
 (0)