title: viewModel.errors is not a function, knockout validation
body: <p>I'm trying to replicate this code</p>
  
  <p><a href="http://jsfiddle.net/KHFn8/5424/" rel="nofollow noreferrer">http://jsfiddle.net/KHFn8/5424/</a></p>
  
  <p>My code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  ko.validation.rules.pattern.message = 'Invalid.';
  ko.validation.init({
      registerExtenders: true,
      messagesOnModified: true,
      insertMessages: true,
      parseInputAttributes: true,
      messageTemplate: null
  }, true);
  
    function person(mname, role, memail, mphone) {
    var self = this;
  
    self.validateNow = ko.observable(false);
    this.mname = ko.observable(mname);
    this.role = ko.observable(role);
    this.memail = ko.observable(memail);
    this.mphone = ko.observable(mphone);
    this.fullName = ko.pureComputed(function() {
      return  self.mname() + " " + "|" + " " + self.role() + " " + "|" + " " + self.memail() + " " + "|" + " " + self.mphone();}, this);
    this.click = function(){}
  }
  
  function viewModel() {
    this.mname = ko.observable('').extend({minLength: 2})
    this.role = ko.observable('');
    this.memail = ko.observable('');
    this.mphone = ko.observable('');
    this.people = ko.observableArray();
    this.add = function(){
          if (viewModel.errors().length === 0) {
      self.people.push(new person(self.mname(), self.role(), self.memail(), self.mphone()));
      self.mname(null);
      self.role(null);
      self.memail(null);
      self.mphone(null);
      } else {
        alert('Please check your submission.');
        viewModel.errors.showAllMessages();
      }
  
    }
    this.remove = function(row){
      self.people.remove(row);
    }
  }
  
  var myviewModel = new viewModel();
  
  $(document).ready(function() {
    ko.applyBindings(myviewModel);
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>All I want to do is make the text input field <code>mname</code> required before adding it. That's all. but it keeps saying</p>
  
  <pre><code>add_club.php:354 Uncaught TypeError: viewModel.errors is not a function
      at viewModel.add (add_club.php:354)
      at HTMLButtonElement.&lt;anonymous&gt; (knockout-3.4.2.js:90)
      at HTMLButtonElement.dispatch (jquery-3.2.1.min.js:3)
      at HTMLButtonElement.q.handle (jquery-3.2.1.min.js:3)
  add @ add_club.php:354
  (anonymous) @ knockout-3.4.2.js:90
  dispatch @ jquery-3.2.1.min.js:3
  q.handle @ jquery-3.2.1.min.js:3
  </code></pre>
  
  <p>basically this line is giving the error</p>
  
  <pre><code> if (viewModel.errors().length === 0)
  </code></pre>
  
  <p>I'm using knockout version 3.4.2 and knockout validation version 2.0.3 and many jquery libraries and Jquery version 3.2.1. So I'm using the latest versions of each library.</p>
  
  <p>The error is with knockout validation, the rest was working just fine before I tried to use it. </p>