From f7b492358483957c7b254507564dd27f1a070a9e Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 24 Sep 2018 16:54:50 -0400 Subject: [PATCH] Update for the email in attendance Only validate if email is there --- js/frontRegApp.js | 2 +- js/views/front/regRequestRegistrant.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/frontRegApp.js b/js/frontRegApp.js index e8ca491..9a081c9 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -787,7 +787,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var zip = this.$('.reg_zip').val().trim(); var country = ( this.$('.reg_country').val() ) ? this.$('.reg_country').val().trim(): ''; var isValidEmail = app.isValidEmail( email ); - if ( !isValidEmail ) { + if ( !isValidEmail && email ) { alert( 'Email must be valid' ); this.$('.reg_email').val(''); return; diff --git a/js/views/front/regRequestRegistrant.js b/js/views/front/regRequestRegistrant.js index cebbc59..d4950b2 100644 --- a/js/views/front/regRequestRegistrant.js +++ b/js/views/front/regRequestRegistrant.js @@ -41,7 +41,7 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({ var zip = this.$('.reg_zip').val().trim(); var country = ( this.$('.reg_country').val() ) ? this.$('.reg_country').val().trim(): ''; var isValidEmail = app.isValidEmail( email ); - if ( !isValidEmail ) { + if ( !isValidEmail && email ) { alert( 'Email must be valid' ); this.$('.reg_email').val(''); return; -- 2.17.1