1 Reply Latest reply on Aug 7, 2006 7:10 AM by peterent

    Validators

    GG77
      Hi all,
      I would like to validate a container (all controls in a container), is there a built in solution for that?
      If not how can i find all the validators available in that container, so i would use Validator.validateAll(..)?
      Thanks
        • 1. Re: Validators
          peterent Level 2
          The idea behind validateAll is to validate the fields on a Model. You tie the Model to all the controls you want to validate. They can be in the same container or not.

          <mx:Model id="myModel">
          <firstname>{firstName.text}</firstname>
          ...
          </mx:Model>

          <mx:StringValidator source="{myModel}" property="firstname" ... />

          Now do the validateAll on the model.