title: Dojo/Dijit setting invalid message and failing validation
body: <p>I have a form item with <strong>missingMessage</strong> and <strong>invalidMessage</strong> defined for the item. I call the form validation method on the item for validation. If the item is empty the <strong>missingMessage</strong> is called and the red exclamation mark error icon is shown. </p>
  
  <p>I am trying to set the <strong>invalidMessage</strong> on text item when the user enters a specific value how can i get the <strong>invalidMessage</strong> and the red exclamation mark to show  without hard coding a constraint on the text item.</p>
  
  <p>I would like to use this for custom validation on items. If the user enters a particular value i would like fail the validation and return an error. <a href="http://jsfiddle.net/devdarin/ZtzTE/31/" rel="nofollow">Here</a> i am trying to tell the user they cannot enter the value <em>'John'</em> in the first name field. I am getting the red exclamation mark set however the <strong>invalidMessage</strong> is not showing.</p>
  
  <p>I would like when the user clicks on the exclamation mark they can see the error message and when they begin to type or change the contents of the field the exclamation mark nad error message is no longer shown.</p>
  
  <p><strong>Jsp</strong></p>
  
  <pre><code>&lt;body class="claro"&gt;
      &lt;form id="myform" data-dojo-type="dijit/form/Form"&gt;
  
      &lt;input
      data-dojo-type="dijit/form/ValidationTextBox"
          data-dojo-props="
              regExp: '[\\w]+',
              required: true,
              invalidMessage: 'Invalid First Name !',
              missingMessage: 'First Name Required !'"
          id="fnameTextBox" title="First Name"
      placeholder="Your First Name"
      /&gt;
  
      &lt;input
      data-dojo-type="dijit/form/ValidationTextBox"
          data-dojo-props="
              regExp: '[\\w]+',
              required: true,
              invalidMessage: 'Invalid Last Name !',
              missingMessage: 'Last Name Required !'"
          id="lnameTextBox" title="Last Name"
      placeholder="Your Last Name"
      /&gt;
  
       &lt;button id="validateFields" data-dojo-type="dijit/form/Button"&gt;Validate&lt;/button&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>dojo.require("dijit/form/Form");
  dojo.require("dijit/form/Button");
  dojo.require("dijit/form/ValidationTextBox");
  dojo.require("dijit/Tooltip");
  
  dojo.ready(function() {
      var fName = dijit.byId("fnameTextBox");
      var lName = dijit.byId("lnameTextBox"); 
  
      dojo.connect(dijit.byId("validateFields"), "onClick", function() {      
          var myform = dijit.byId('myform');
          myform.connectChildren();   
  
  
          if(fName == "John"){
              dijit.byId("fnameTextBox")._set("state","Error");
              dijit.byId("fnameTextBox").attr('_ErrorMessage', 'John is not allowed');
  
          }else{
               myform.validate();
          }
  
      }); 
  });
  </code></pre>