code: function valErrsChanged(newValue) {
  
                      // HTML5 custom validity
                      // http://dev.w3.org/html5/spec-preview/constraints.html#the-constraint-validation-api
                      if (domEl.setCustomValidity) {
                          /* only works in HTML 5. Maybe should throw if not available. */
                          domEl.setCustomValidity(newValue || '');
                      }
  
                      var errorHtml = newValue ? valTemplate.replace(/%error%/, newValue) : "";
                      var isRequired = info.getIsRequired();
                      var requiredHtml = isRequired ? requiredTemplate : '';
                      decorator.innerHTML = (isRequired || !!errorHtml) ? requiredHtml + errorHtml : "";
                  }
docs: update the message in the validation template when a validation error changes on an input control newValue is either a string or null (null when no bound entity)