diff --git a/formatters/tabs/tabs.js b/formatters/tabs/tabs.js
index c2c5b5d..9803ec4 100644
--- a/formatters/tabs/tabs.js
+++ b/formatters/tabs/tabs.js
@@ -32,6 +32,20 @@
           }
         });
 
+        // Check input validity to change selected tab if browser invalidates.
+        $('.form-actions .form-submit').once('form-actions-tabs').click(function() {
+          $(context).find('[data-' + direction + '-tabs-panes] details input').each(function () {
+            if (!$(this)[0].checkValidity()) {
+              var $parent = $(this).closest('details');
+              if (typeof $parent.data(direction + 'Tab') !== 'undefined') {
+                $parent.data(direction + 'Tab').link.parent().addClass('error');
+                Drupal.FieldGroup.setGroupWithfocus($parent);
+                $parent.data(direction + 'Tab').focus();
+              }
+            }
+          });
+        });
+
       }
     }
   };
