1 Reply Latest reply on Jan 25, 2010 7:44 AM by mandriluy

    bug in StringValidator ??

    mandriluy

      Hi, i think i found a serious problem.

       

      I have 2 form items and 2 validators, the form items are TextInput.

       

                  <mx:FormItem label="Nombre completo:" required="true">
                      <mx:TextInput id="nombreTextInput"/>
                  </mx:FormItem>
                  <mx:FormItem label="Documento de identidad: " required="true">
                      <mx:TextInput id="documentoIdTextInput"/>
                  </mx:FormItem>

       

      I made validations for them...

       

      <mx:StringValidator id="nombreValidator" source="{nombreTextInput}" property="text" requiredFieldError="This field cannot be blank" />
      <mx:StringValidator id="documentoIdValidator" source="{documentoIdTextInput}" property="text" requiredFieldError="This field cannot be blank" />

       

      So if i focus on documentoId and then press TAB it show me red with the error : "This field cannot be blank" ... my custom error.

      But if i start from the first field.. nombre and leave it blank and then press tab, focus on the documento and press tab.. it shows me the default error: This field is required.

       

      I dont want that default error ¬¬ ... cause my  app is in spanish and im going to add spanish errors... lol , is this a bug ??

        • 1. Re: bug in StringValidator ??
          mandriluy Level 1

          I reply to my self.. i solve the problem and it was not a bug, thing was i had another validator for same field without the requiredFieldError property so it uses that somehow when it triggers the error and i solve it adding the same message to the other validator.