Skip to content

Commit db9908b

Browse files
committed
chore: updated regex pattern to reduce complexity
1 parent 6585327 commit db9908b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types/Patterns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Patterns = {
4141
LABEL: /^[a-z0-9-_ ]{1,80}$/i,
4242
BPN: /^BPNL[0-9A-Z]{12}$/i,
4343
MAIL: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*))@(([a-z0-9-]+\.)+[a-z]{2,})$/,
44-
PHONE: /^(\+?\d{1,3}\s?)?(\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4,7}$/,
44+
PHONE: /^(\+?\d{1,3})?\s?\(?\d{3}\)?[.\s-]?\d{3}[.\s-]?\d{4,7}$/,
4545
DOMAIN: new RegExp(`^${DOMAIN.source}$`, 'i'),
4646
PATH: new RegExp(`^${URLPATH.source}$`, 'i'),
4747
URL: urlPattern,

0 commit comments

Comments
 (0)