0 Replies Latest reply on Mar 3, 2008 10:28 PM by Peanut_Lee

    Flex bug in Validator?

    Peanut_Lee
      see mx.validators.Validator.as
      line:929
      ValidationResult has a constructor of :
      ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "")
      The first parameter means a "ValidationResult" maybe a result carrying error validation result or may b]not be.

      But when the results return from function "doValidation " and pass to function "handleResults"(shows below),its name turns into a "errorResults" and make the event type to be "INVALID"

      protected function handleResults(errorResults:Array):ValidationResultEvent
      {
      var resultEvent:ValidationResultEvent;

      if (errorResults.length > 0)
      {
      resultEvent =
      new ValidationResultEvent(ValidationResultEvent.INVALID);
      resultEvent.results = errorResults;
      ...
      }
      else
      {
      resultEvent = new ValidationResultEvent(ValidationResultEvent.VALID);
      }