Ticket #5958: 5958.patch

File 5958.patch, 2.2 kB (added by becky, 6 months ago)

remove default invalid message

  • Users/bgibson/Documents/workspace/trunk/dijit/form/ValidationTextBox.js

     
    3939 
    4040                // invalidMessage: String 
    4141                //              The message to display if value is invalid. 
    42                 invalidMessage: "$_unset_$", // read from the message file if not overridden 
     42                invalidMessage: "", // read from the message file if not overridden 
    4343 
    4444                // constraints: dijit.form.ValidationTextBox.__Constraints 
    4545                //              user-defined object needed to pass parameters to the validator functions 
     
    161161                postMixInProperties: function(){ 
    162162                        this.inherited(arguments); 
    163163                        this.constraints.locale = this.lang; 
    164                         this.messages = dojo.i18n.getLocalization("dijit.form", "validate", this.lang); 
    165                         if(this.invalidMessage == "$_unset_$"){ this.invalidMessage = this.messages.invalidMessage; } 
    166164                        var p = this.regExpGen(this.constraints); 
    167165                        this.regExp = p; 
    168166                        var partialre = ""; 
  • Users/bgibson/Documents/workspace/trunk/dijit/tests/form/test_validate.html

     
    114114                                <input id="gv3" size="10" disabled value="" autocomplete="off"> 
    115115                                </nobr> 
    116116                        </div> 
     117                         
     118                        <div class="dojoTitlePaneLabel"> 
     119                                <label for="fav">Favorite Number (1-100):  </label> 
     120                                <span class="noticeMessage"> NumberTextBox class, Attributes: required=true, must be integer, no messages provided,  no initial value specified, maxlength=3</span> 
     121                        </div> 
     122                        <div class="testExample"> 
     123                                <input id="fav" type="text" name="fav" class="small" 
     124                                        dojoType="dijit.form.NumberTextBox" 
     125                                        maxLength="3" 
     126                                        constraints="{places:0,min:1,max:100}" 
     127                                        dojo.regExpGen="dojo.regexp.integer" 
     128                                        required="true"> 
     129                        </div> 
    117130 
    118131                        <div class="dojoTitlePaneLabel"> 
    119132                                <label for="q04">Occupation:  </label>