title: Knockout Validation - Dont validate input when empty + evaluate when submit
body: <p>check this fiddle:</p>
  
  <p><a href="http://jsfiddle.net/bhzrw01s/" rel="noreferrer">http://jsfiddle.net/bhzrw01s/</a></p>
  
  <p>I was trying to do 2 things:</p>
  
  <p>First: Dont validate when the field is empty. I know there is a onlyif option.. but is there something easier?</p>
  
  <p>Second: I need something to run the validation when i click on submit (If you test my fiddle, the error messages will pop, but wont apply the errorClass css)</p>
  
  <p>Thanks :D</p>
  
  <p>css:</p>
  
  <pre><code>input.error {
      color: red;
      border-color: red;    
  }
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>ko.validation.configure({
      insertMessages: false,
      decorateElement: true,
      errorElementClass: 'error',
      messagesOnModified: false    
  });
  
  function SignInViewModel() {
  
      var self = this;
      self.userName = ko.observable().extend({
          required: true
      });
      self.password = ko.observable().extend({
          required: true
      });
  
      self.errors = ko.validation.group(self);
      self.login = function (e) {
  
          if (self.errors().length == 0) {
              alert('No errors');
          } else {
              this.errors().forEach(function(data) {
                 alert(data);
          });
              //self.errors.showAllMessages(true);
          }
      }
  
  }
  $(function () {
      ko.applyBindings(new SignInViewModel());
  });
  </code></pre>
  
  <p>html :</p>
  
  <pre><code>&lt;form&gt;
  &lt;fieldset&gt;
      &lt;legend&gt;User: &lt;span data-bind='text: errors().length'&gt;&lt;/span&gt; errors&lt;/legend&gt;
      &lt;label&gt;User name: &lt;input data-bind='value: userName' type="text"/&gt;&lt;/label&gt;&lt;br/&gt;
      &lt;label&gt;Password: &lt;input data-bind='value: password' type="password"/&gt;&lt;/label&gt;
  
  &lt;/fieldset&gt;
  &lt;button type="button" data-bind='click: login'&gt;Login&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>