fix email validation issue #212
This commit is contained in:
@ -94,8 +94,10 @@ exports.getEmailSignup = function(req, res) {
|
||||
*/
|
||||
|
||||
exports.postEmailSignup = function(req, res, next) {
|
||||
var errors = req.validationErrors();
|
||||
|
||||
req.assert('email', 'valid email required').isEmail();
|
||||
var errors = req.validationErrors();
|
||||
|
||||
if (errors) {
|
||||
req.flash('errors', errors);
|
||||
return res.redirect('/email-signup');
|
||||
|
Reference in New Issue
Block a user