Use the browser to validate email fields
You are using HTML5 typed text input fields, aren't you?
If you make an input element with type="email"
and you make it required
, then the browser will take care of making sure that the email is valid on form submit. Automatically.
Doesn't eliminate the need for validation on the server side, or does it?