4 Replies Latest reply on May 25, 2009 12:26 AM by Cesare Rocchi

    Which Listener is the best for Validation?

    kage0002 Level 1

      Hi,

       

      I have a problem with my Validation. At the moment everytime I write something in the TextInput the keyUp Event triggers the validate() function. But I want to trigger the function before I type something in, because if I don´t type anything at all the keyUp Event doesn´t trigger the validate function. Is there a better Event then the keyUp or any other way how to trigger my function right away?

       

       

      TextInput :

       

      <mx:TextInput

       

      keyUp="validate()" />

       

      Validator:

       

      <validators:Validator

       

      triggerEvent="keyUp" />

      validate(){

      Validator.validate();

      }

       

       

      Thanks.

      Regards Kat