var validator = require('validator'); validator.isEmail('foo@bar.com'); //=> true
Great javascript validator: https://jshint.com/