I put together a Flex-independent validation utility. I liked
yours Ryan, much smaller than Flex's, but you are sticking with the Flex API so that it can be used in Flex too since it is OpenFlux.
We aren't limiting ourself to Flex interfaces, so I changed some things. I don't like having an invalidateProperties, invalidateSize, etc. for each thing. It limits validation to only be used for what we assume it will be. What if layout want to tie in, or styling, or some other component. I also don't want to force a validation interface onto our components that say there must be a validateSize method. So I made it so you pass in your validation method when invalidating. This keeps it flexible for anything to use and provides greater pay-as-you-go-ability (I think I'll use expandability for now on, but assume it means pay-as-you-go).
Another thing I don't like about Flex implementation is using a globals class to access the application class. It isn't testable and validation happens always, even when things aren't on the stage and don't need to layout, redraw, etc. Maybe we still want that to happen, but right now I've got it optimized to only validate when on the stage using the RENDER event.
I'm also using EventDispatcher to do all the heavy lifting for me so the code is very small. I don't have to iterate through arrays, check if items are on the stage or not, etc. I've only keep a dictionary of listeners so that I can remove them if uninvalidate is called.
I've got a lot of comments in there so hopefully everything makes sense. I didn't have anywhere else to commit it, so I put it in the project. We can take it out if we have a different or better solution we want to do.
I've tested it and it works great. I'd be happy for feedback.
Jacob