var email = $('.email').val() if (!validateEmail(email)) { $('input.email').addClass('validation-error') return }