title: Dynamic Knockout Validation not showing error message
body: <p>I have a property on my view model that only requires to be validated under certain conditions.</p>
  
  <p>It's working fine in the sense that, when I check the console for viewModel.errors() it's showing me the error in there, however the message is never showing up on the page. It works if I extend my observable to begin with, but if I remove the validation and put it back on it won't show the error message on the page anymore.</p>
  
  <p>In the example below, if you load the code/jsfiddle, click on the "Enable Required" button and then on "Show Errors" you'll see it throws the error correctly but won't show the error message. I've tried this with and without the customMessageTemplate (my live tool uses the customMessageTemplate though).</p>
  
  <p>Also one thing this jsfiddle does that my live tool doesn't is throw an error when trying to disable required state, not quite sure why it's doing that. And the <code>self.errors</code> field isn't being populated with the errors but with a function which doesn't happen in any of my other validation models.</p>
  
  <p>The only main difference between the code below and my live build uses a ko.computed property to update whether my <code>self.features</code> needs validation or not, instead of using a function but the end result is the same.</p>
  
  <p>Here's a <a href="http://jsfiddle.net/LanFeusT/ZV2g8/1/" rel="nofollow">jsfiddle</a> of my issue.</p>
  
  <p>And here's the code:</p>
  
  <pre><code>&lt;div id='container'&gt;
      &lt;select data-bind="value: feature, options: features, optionsCaption: 'Select'"&gt;&lt;/select&gt;
  
      &lt;br/&gt;
  
      &lt;button data-bind='click: attachRequired'&gt;Enable Required&lt;/button&gt;
      &lt;button data-bind='click: removeRequired'&gt;Disable Required&lt;/button&gt;
      &lt;button data-bind='click: showMessages'&gt;Show errors&lt;/button&gt;
  
  &lt;/div&gt;
  
  &lt;script id="customMessageTemplate" type="text/html"&gt;
      &lt;em class="customMessage" data-bind='validationMessage: field'&gt;&lt;/em&gt;
  &lt;/script&gt;
  
  ko.validation.configure({
      //decorateElement: true,
      registerExtenders: true,
      messagesOnModified: true,
      insertMessages: true,
      parseInputAttributes: true,
      messageTemplate: 'customMessageTemplate'
  });
  
  
  function viewModel(){
      var self = this;
  
       self.errors = ko.validation.group(self, {
          deep: false,
          observable: false
      });
  
      self.feature = ko.observable();
      self.feature.subscribe(function () {
          alert(self.feature());
      })
      self.features = ["test1", "test2", "test3"];
  
      self.attachRequired = function () {
          self.feature.extend({
              required: {
                  message: 'please select a feature'
              }
          })  
      };
  
      self.removeRequired = function () {
          self.feature.extend({ validatable: false });
      };
  
      self.showMessages = function () {
          self.errors.showAllMessages();
          alert(self.errors().length ? "error" : "no errors");
      };
  }
  
  
  var model = new viewModel();
  
  ko.applyBindings(model);
  </code></pre>