Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

Flex Validator example – mx:PhoneNumberValidator – mx:EmailValidator

Posted on February 25, 2010 | No Comments

Code below shows Flex validator component example. With these components different types of data are get validated with appropriate validators. buy cialis canadian 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.

<?xml   version = '1.0' encoding   = 'ISO-8859-1'?>
<mx:Application xmlns:mx = ''>

        <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 = ''/>


Incoming search terms:

Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.


Leave a Reply

You must be logged in to post a comment.