Skip to content

Commit 7244509

Browse files
Fix: Update npm username regex to support underscores and dots
1 parent 3cf7fef commit 7244509

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shared/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as v from 'valibot'
22

3-
const NPM_USERNAME_RE = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i
3+
const NPM_USERNAME_RE = /^[a-z0-9]([a-z0-9-_.]*[a-z0-9])?$/i
44
const NPM_USERNAME_MAX_LENGTH = 50
55

66
/**

0 commit comments

Comments
 (0)