Hi..
when we using the Flex validators do not eliminate the need to perform data validation on the server, but provide a mechanism for improving performance by performing some data validation on the client side.when the user enter the data in the UIcontrols it should have some rules to the application.
we write codes in two ways
* MXML.
* ActionScrpit.
In MXML I created one simple to validate the phone number.
Code
mx:PhoneNumberValidator
id="pnV"
source="{phoneInput}"
property="text"
mx:TextInput id="phoneInput"
In above sample phone number validator is used to validate the phone number.
Text input box is used to enter the data,and the data should be less than 10 digit number.Else,it shows error in red color around the box.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment