AdvancedForm update, isValid Validator integration
The AdvancedForm component has been updated to provide a simple approach to Validation. The AdvancedForm now looks for any Validators present in the same document scope. It then tracks any Validators valid or invalid change. It also exposes the “isValid” property that is set to True if all Validators in the same document scope are valid.
To see the updates in action nativate to:
http://renaun.com/flex2/AdvancedForm/
You’ll find a form with a “Submit Data” and a “Reset Form” button. The example has two Validators on the firstName and lastName TextInput controls. If you fill in the two name fiields the “Submit Data” button will become enabled, as its bound to the new “isValid” AdvancedForm property. Also a side note on reseting the form, the AdvancedForm does disable all Validators before reseting any fields and then enables the fields after the reset. This is to keep the action of Reseting any of the fields to cause the Validators to fire any events.
You’ll find the updated AdvancedForm component page here: