Skip to content

Commit

Permalink
chore: updated regex pattern to reduce complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
Usmanfee committed Nov 15, 2024
1 parent 6585327 commit db9908b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/Patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Patterns = {
LABEL: /^[a-z0-9-_ ]{1,80}$/i,
BPN: /^BPNL[0-9A-Z]{12}$/i,
MAIL: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*))@(([a-z0-9-]+\.)+[a-z]{2,})$/,
PHONE: /^(\+?\d{1,3}\s?)?(\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4,7}$/,
PHONE: /^(\+?\d{1,3})?\s?\(?\d{3}\)?[.\s-]?\d{3}[.\s-]?\d{4,7}$/,
DOMAIN: new RegExp(`^${DOMAIN.source}$`, 'i'),
PATH: new RegExp(`^${URLPATH.source}$`, 'i'),
URL: urlPattern,
Expand Down

0 comments on commit db9908b

Please sign in to comment.