Monorepo for Tangled โ€” https://tangled.org

appview/email: Replace regex check with mail.ParseAddress. Add unit tests. #839

merged
opened by evan.jarrett.net targeting master from evan.jarrett.net/core: email-verify

Was troubleshooting an issue in discord and wrote some tests to verify things were parsed correctly. The orignal regex was missing leading and trailing period detection. Go has a built in function for parsing/validating email addresses based on the RFC that doesn't use regex, and performs slightly faster in a benchmark.

0
by evan.jarrett.net 1 comment
expand 1 commit
appview/email: Replace regex check with mail.ParseAddress. Add unit tests.

Good one! Can you re-author to fit the guidelines? Can just be "appview/email: replace regex check with mail.ParseAddress".

sign up or login to add to the discussion
expand 1 commit
appview/email: replace regex check with mail.ParseAddress
pull request successfully merged
sign up or login to add to the discussion
Labels
enhancement
refactor
assignee

None yet.

Participants 3
AT URI
at://did:plc:pddp4xt5lgnv2qsegbzzs4xg/sh.tangled.repo.pull/3m6wsdc42ic22