title: Knockout Validation preventing click handler for the first time
body: <p>It seems that knockout validation plugin somehow prevents from executing click handlers.
  Here is my simplified code.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div&gt;
      &lt;input type="text" data-bind="value: code" /&gt;
      &lt;button data-bind="click: execute"&gt;VALIDATE&lt;/button&gt;
  &lt;/div
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
      $(document).ready(function () {
          var ViewModel = function () {
              var self = this;
              this.code = ko.observable();
              this.code.extend({ required: true });
              this.execute = function () {
                  if (self.code.isValid()) {
                      alert("SUCCEED");
                  }
                  else {
                      self.code.valueHasMutated(); //just to show error message
                      alert("FAILED");
                  }
              };
          };
  
          ko.applyBindings(new ViewModel());
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>My scenario:</strong></p>
  
  <ol>
  <li>Load page</li>
  <li>Click VALIDATE - error message appears and alert shows FAILED</li>
  <li>Enter any text into input and immediately click VALIDATE - error message disappears, but no alert shown.</li>
  <li>Click VALIDATE again - only now alert can be seen with SUCCEED text.</li>
  </ol>
  
  <p>How can this be fixed so the VALIDATE button will work correctly from the first click?</p>
  
  <p>Thanks,
  Ihor</p>