title: SweetAlert2 - Only dismiss after confirming fucntion
body: <p>I am using <code>preConfirm</code> to only dismiss the popup if the input matches the value (a confirm UX). The problem is that if I enter an input that doesn't match and press remove, the buttons are disabled.</p>
  <p>How do I set up the <code>preConfirm</code> so that the buttons aren't disabled after an incorrect entry?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".admin__list").on("click", ".btn--remove", function(e) {
    var $btn = $(this);
    swal({
      title: "Remove User?",
      text: "Are you sure you want to delete and remove all permissions for this user?",
      confirmButtonText: "Remove",
      confirmButtonColor: "#f27474",
      cancelButtonColor: "#d33",
      reverseButtons: true,
      showCancelButton: true,
      html: ' &lt;b class="sweet__code"&gt;1234&lt;/b&gt;' +
        '&lt;input type="text" class="sweet__input"&gt;&lt;/&gt;' +
        '&lt;dive class="sweet__error"&gt;Error!&lt;/&gt;',
      preConfirm: function() {
        return new Promise(function(resolve) {
          var sweetCode = $(".sweet__code").html();
          if ($(".sweet__input").val() == sweetCode) {
            $btn.closest(".admin__item").remove();
            resolve();
          } else if ($(".sweet__input").val() !== sweetCode) {
            $(".sweet__error").show();
          }
        });
      }
    }).then((result) =&gt; {
      if (result.value) {}
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.sweet__error {
    display: none
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.2.0/sweetalert2.min.css"&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.2.0/sweetalert2.all.min.js"&gt;&lt;/script&gt;
  
  &lt;div class="admin__list"&gt;
    &lt;div class="admin__item"&gt;
      &lt;button type="button" class="btn btn--remove"&gt;Delete&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="admin__item"&gt;
      &lt;button type="button" class="btn btn--remove"&gt;Delete&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>