Follow-up from "Change email validation regex to use Devise email regex"

The following discussions from !128471 (merged) should be addressed:

  • @snachnolkar started a discussion: (+1 comment)

    thought (non-blocking): I wonder if it makes sense to also update the EMAIL_REGEXP constant with the new regex (unless we actually want different validation conditions in some parts of the codebase) so that we can have a common regex being used across the codebase. However the scope of that change and the corresponding testing effort might be much bigger.

  • @snachnolkar started a discussion: (+1 comment)

    suggestion (non-blocking): We could convert this to an utility function validateEmail(email) that can be used to validate email by encapsulating the regex.test part.

    However, I don't feel strongly about this and maybe just having the regex as a constant is enough.