Home Flex Flex Validator example



Flex Validator example
Posted on: September 8, 2008 at 12:00 AM
Code below shows Flex Validator component example. With these components different types of data are get validated with appropriate validators.

Flex Validator example

     

Code below shows Flex validator component example. With these components different types of data are get validated with appropriate validators. The provided flex feature is mostly used in validating the user ids,  email addresses and passwords. 

In the example validator for email and phone numbers are made. When the user writes, data validator checks the syntax and type of data entered and if the data entered is found to be wrong,  the corresponding validator generates error message  in red text format.
Similarly many different types of validators can be created and that you will be going to learn soon.  

 

 

 

 

 

validator.mxml

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<mx:Application xmlns:mx = 'http://www.adobe.com/2006/mxml'>

  <mx:PhoneNumberValidator source = '{phoneNumber}
 property = 'text'/>
  <mx:EmailValidator source = '{EmailId}
 property = 'text'/>

  <mx:Panel title = 'Flex Validator Control'>
  
  <mx:TextInput id = 'phoneNumber
  text = 'Your valid phone number.'/>
  <mx:TextInput id = 'EmailId
  text = 'baadshah@newstrackindia.com'/>
  
  </mx:Panel>

</mx:Application>

validator.swf

Download the code

Related Tags for Flex Validator example:
cflexcomdatedatadifftypescomponentsgettypecomponentriavalidatorsidappshowifvalidateexamplewithlextoexamvalidatorwssheitlipedifferentmntesvalidhowpropptorxaxampsatidamplarcodcodevassrirenthshobeloapfepleplpropprodeonomo


More Tutorials from this section

Ask Questions?    Discuss: Flex Validator example   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.