Skip navigation
Currently Being Moderated

Validantion Library 1.2 not working

Dec 28, 2009 3:10 AM

Hi, I've updated the source of the validation library to version 1.2, and I discovered that the ValidatorSubscriber doesn't pass feedbacks of its state to the controller (basically you don't get the red focus if the field is not valid).

You can see this behavior in the Sample3 Application file of the ValidationTest project, the same test was working fine in version 1.0 of the validation library

 
Replies
  • Currently Being Moderated
    Jan 11, 2010 10:57 AM   in reply to paob24

    Hi,

     

    I can't reproduce that. If I update from trunk and run the Sample3.mxml I see the red error tips. The validation library 1.2 is working AFAIK. Are you sure you're using the latest trunk version on Flex SDK 3.3?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2010 1:39 PM   in reply to paob24

    I see now. I have had an older version of the validation library that worked. A recent change has broken a feature exposed through Sample3.mxml. We'll try to have this fixed ASAP. Thank for the pointer.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2010 7:13 AM   in reply to paob24

    I discovered the same issue and ended up fixing it myself and buildling a new Validation SWC from the SVN source.

     

    The fix is in the subscribeControl function in ValidatorGroupSubscriber.

     

    Change

     

                if( subscriber.listener && subscriber.listener is Array )
                {
                    subscriberListener = new ValidatorMultipleListeners( subscriber.listener as Array );       
                }
                else if( ! subscriber.listener is Array )
                {
                    subscriberListener = EventDispatcher( subscriber.listener );
                }

     

    to

     

                if( subscriber.listener && subscriber.listener is Array )
                {
                    subscriberListener = new ValidatorMultipleListeners( subscriber.listener as Array );       
                }
                else if( !(subscriber.listener is Array) )
                {
                    subscriberListener = EventDispatcher( subscriber.listener );
                }

     

    The subscriber listener wasn't getting set due to the missing brackets.

     

    Anthony

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2010 10:16 AM   in reply to Anthony.R

    Nice catch, Anthony! Thanks! I've just committed your fix to trunk.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points