0 Replies Latest reply on May 31, 2007 8:35 AM by gumnam

    Enumerating through list of validators in a component

    gumnam
      Hi,

      I have a form with multiple fields and it has multiple validators(each associated with a field).The form also has ok and cancel button.

      What I would like to do is to find out whether all the validators succeeded or not. Earlier in Flex 1.5 I used to use Validator.isStructureValid(formId, "model") and it used to trigger validation framework and return boolean indicating whether validation passed or failed.

      WIth Flex 2.0 I am thinking to use Validator.validateAll function and using the length of the returned array to be > 0 , to see whether anything failed. However validateAll function needs a list of validators as argument. Is there a way to programmatically find out what are all the list of validators available in the current component? I know I can always populate array statically, but is there a dynamic way like going through childDescriptors array or something ?