I would like to iterate through an object's validators. Validators must be declared in a declarations tag. How does one scroll through declarations? If one cannot, is there a better of locating all validators other than scrolling through all properties of an object?
Just put the Validators in a collection (an Array for instance). After that you can simply loop over the collection's items.
<fx:Declarations>
<fx:Array id="validators">
<mx:StringValidator source="{firstnameInput}" property="text" required="true" />
<mx:StringValidator source="{lastnameInput}" property="text" required="true" />
<mx:EmailValidator source="{emailInput}" property="text" required="true" />
<mx:DateValidator source="{dateInput}" property="text" required="false" />
</fx:Array>
</fx:Declarations>
You can then simply use 'validateAll()':
Validator.validateAll(validators);
or loop over the Validators:
for each (var validator:Validator in validators) { ... }
I'm not sure if I understand your question correctly, but if you want to iterate over all properties of a class (including meta tags), you can use describeType.
To include meta tags, make sure you've set the appropriate compiler option keep-as3-metadata
correctly.