title: Knockout: how to make input required if a field was filled and not required when it's empty
body: <p>I want to make a password change form. It should be displayed on the settings page at any time and be not required to be filled. However if at least one of three fields (old pass, new pass, confirm) is filled others should become required. </p>
  
  <p>Can I achieve that?</p>
  
  <p>Here is my temporary code</p>
  
  <pre><code>    self.oldPass = ko.observable().extend({ minLength: 6, maxLength: 20, validation: { validator: checkEqual, message: 'Неверный пароль.', params: self.password } });
      self.newPass = ko.observable().extend({ minLength: 6, maxLength: 20, validation: { validator: newPassValid, message: 'Неверный пароль.' } });
      self.newPassCheck = ko.observable().extend({ minLength: 6, maxLength: 20, validation: { validator: checkEqual, message: 'Пароли не совпадают.', params: self.newPass } });
  
  function newPassValid(pass){
  
  }
  function checkEqual(val, other){
       return val == other();
  }
  </code></pre>