Returns a validation function to validate that a string is in a valid format for an email address. Validation errs on
the side of allowing invalid email addresses rather than blocking valid email addresses. In other words, validation
is focused on preventing common mistakes without being too restrictive.
Parameters
errorMessage: string = "That is not a valid email address."
The error message to display if the value is invalid.
Returns a validation function to validate that a string is in a valid format for an email address. Validation errs on the side of allowing invalid email addresses rather than blocking valid email addresses. In other words, validation is focused on preventing common mistakes without being too restrictive.