On my site I use Angular and the $http
object to send an email. It's just a simple contact form. I validate the email and make sure the required fields have been filled with a simple regular expression.
Even with server-side languages, there's still not really away to validate emails as far as I know. (See this question.) The most I could really do is apply the same basic regex.
Since I'm sending the email with a client side script (I don't even support people who have JS disabled anymore. A good discussion here on that.) and the email will not send unless the user has JavaScript enabled, is there really any need to validate on the server-side?
Is there a general rule of thumb for when you need to use server-side validation?