Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 140081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:33:02+00:00 2026-05-11T07:33:02+00:00

Say I have a phone-number validator in flex and I have two TextInput controls

  • 0

Say I have a phone-number validator in flex and I have two TextInput controls for phone numbers. I don’t want to have two separate validator controls defined that have essentially the same attributes… but each validator has only one ‘source’ attribute. How can I use the same validator on multiple control? (or any equivalent solution)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:33:03+00:00Added an answer on May 11, 2026 at 7:33 am

    Not inline, but you can perform the validation programmatically, say, on submission of a form, or when a user tabs out of a control, etc. Here’s an example using a single PhoneNumberValidator to validate two form fields; the validation happens when the Submit button gets clicked:

    <mx:Script>     <![CDATA[          private function validatePhoneNumber(txt:TextInput):void         {             v.listener = txt;             v.validate(txt.text);         }          private function btn_click():void         {             validatePhoneNumber(p1);             validatePhoneNumber(p2);         }      ]]> </mx:Script>  <mx:PhoneNumberValidator id='v' allowedFormatChars='()- .+' property='text' requiredFieldError='Required.' wrongLengthError='Invalid length.' invalidCharError='Invalid character.' />  <mx:Form>     <mx:FormItem label='Phone Number 1'>         <mx:TextInput id='p1' />         </mx:FormItem>     <mx:FormItem label='Phone Number 2'>         <mx:TextInput id='p2' />         </mx:FormItem>     <mx:FormItem>         <mx:Button id='btn' label='Submit' click='btn_click()' />     </mx:FormItem> </mx:Form> 

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say i have a phone number like: 05395042123 I want to convert it
Say I have a Date, or a Phone number, or some Class which I
Lets say I have two tables like this: person: id, first_name, last_name, phone_id phone:
I want to change the phone number that is displayed on one of my
Lets say I have a Phone number my classes need to validate and keep
Let's say I want to have a Form with a field, email, that is
Ok say I have my phone numbers stored in my table as: 0008675309 I
Let's say I have two tables ( Address and Phone ) in sql which
Say I have a Telerik MVC Grid, AJAX bound and I want to put
Say I have a SSI script that uses exec, or a PHP script that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.