* wip: fix draft order shipping details screen * fix: reset address, refactor and cleanup * fix: use const * Create .changeset/violet-sloths-train.md * fix: required fields, reset province --------- Co-authored-by: fPolic <frane@medusajs.com> Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
10 lines
319 B
TypeScript
10 lines
319 B
TypeScript
const EMAIL_REGEX =
|
|
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
|
|
/**
|
|
* Validate if provided string could be an email
|
|
*/
|
|
export function isValidEmail(email: string) {
|
|
return email?.match(EMAIL_REGEX)
|
|
}
|