Flex features predefined validation mechanism to validate data. The benefits of Flex validator is that it do not eradicate the requirement of data validation on the server. But it provides a mechanism as to how, one can improving performance by using the validation services.

 
The below sample code is a use of a flex ‘Email Validator’ component which is validating the ‘txtEmail’ textbox by clicking on the ‘btnEmailSubmit’ button.

<mx:EmailValidator source="{txtEmail}" property="text" trigger="{btnEmailSubmit}" triggerEvent="click" invalid="Alert.show('Invalid Email Address');" valid="someAction()"/>

<mx:TextInput id="txtEmail" width="166"/>

<mx:Button id="btnEmailSubmit" styleName="formButton" label="Submit"/>
                    

Flex Discussion

...more

Flex Source Code

...more

Flex Related Tutorials

...more

New Flex Resources

...more

Copyright © 2013 VisualBuilder. All rights reserved