Search Flex Samples

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

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

    '{phoneNumber}
                     property = 'text'/>
    '{EmailId}
                     property = 'text'/>

    'Flex Validator Control'>
    
      'phoneNumber
          text = 'Your valid phone number.'/>
      'EmailId
          text = 'baadshah@newstrackindia.com'/>
    
    

0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples