I have a Flex application that edits a moderately complex object, and I'd like to put some client-side validation in place on multiple parts of the editor. The editor is a set of nested objects:
Form ->
TabNavigator ->
Tab1 ->
Component1.1
Component1.2
Tab2 ->
Component2.1
Component2.2
&c
SubmitButton
The structure echoes the data model fairly closely, and the UI is what the project requires, so I'm not going to be too quick to restructure the classes there if I don't have to -- time is an issue too. What I want to do is have validators for each of the Component*
instances that:
- Show the validation tool tips and UI hints on the relevant UI element
- Disable the SubmitButton when any part of the form is not valid
- (Optionally) provide enough information that I can display an error message in the form.
What's the best way to go about this?