Update for the email in attendance
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Sep 2018 20:54:50 +0000 (16:54 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Sep 2018 20:54:50 +0000 (16:54 -0400)
Only validate if email is there

js/frontRegApp.js
js/views/front/regRequestRegistrant.js

index e8ca491..9a081c9 100644 (file)
@@ -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;
index cebbc59..d4950b2 100644 (file)
@@ -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;