The email address validation is incorrect. Neither test+foo@gmail.com, test+foo@gmail.com., test@io, test@io., test@::123, test@[::123], or test@[::123]:456 are accepted, and likely other cases. I suggest you take the easy route and just only check `emailAddress.indexOf("@") !== -1`.
But if you want to verify email address, then going with must contain '@' is probably one of the more reasonable routes (you should probably also ban few characters like newlines and ';').