From 1642251cb72afeed15e9bf25f16186f98b0c7bf4 Mon Sep 17 00:00:00 2001 From: Jon Lambson Date: Wed, 12 Jul 2017 10:26:53 -0600 Subject: [PATCH] clearing error --- js/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index d609437..6ffa420 100644 --- a/js/script.js +++ b/js/script.js @@ -90,7 +90,12 @@ $('body').on('keyup keypress', '.js-authn-otp-code', function (e) { // if($(this).val().length === $(this).attr("maxlength")){ // $('.submit-btn').prop("disabled", false); // } - $(this).val().length === 14 ? $('.submit-btn').prop('disabled', false) : $('.submit-btn').prop('disabled', true); + if ($(this).val().length === 14) { + $('.submit-btn').prop('disabled', false); + $('.error-msg').empty(); + } else { + $('.submit-btn').prop('disabled', true); + } }); $('.js-authn-otp-code').mask('####-####-####');