Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to validate a Text Input inside a repeater?

Posted on 2011-02-25
Medium Priority
Last Modified: 2012-05-11
How to validate a Text Input inside a repeater? I Have few Text inputs inside a repeter. How to Validate them, or give required== true  when they are placed inside a repeater
Question by:FlexFresher11
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 17

Expert Comment

ID: 34989993
Check this out, it uses a checkbox in repeater.

Warm Regards
Deepanjan Das
LVL 17

Expert Comment

ID: 34989998
Also see the last example in this link:

Warm Re
Deepanjan Das

Author Comment

ID: 35000405
Can you explain me with a code based example, where the textinput inside a repeater should be required.
How to set  required== true  
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

LVL 17

Expert Comment

ID: 35003515
okie, I will try to put up a sample for your sometimes early tomorrow PST.

Warm Regards
Deepanjan Das
LVL 17

Accepted Solution

deepanjandas earned 2000 total points
ID: 35007044
Try this:
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<mx:Application xmlns:mx=""
				backgroundColor="white" viewSourceURL="srcview/index.html">
			import mx.controls.Alert;
			import mx.controls.CheckBox;
			private function onClickHandler(event:Event):void 
				var idx:int;
				var len:int = arr.length;
				for (idx=0; idx<len; idx++) {
					if (textInput[idx].text == "" ) {
						status.text = "required field.";
						stage.focus = textInput[idx];
				status.text = "";"submit data");
	<mx:Array id="arr">
		<mx:Object label="Red" data="red" />
		<mx:Object label="Orange" data="haloOrange" />
		<mx:Object label="Yellow" data="yellow" />
		<mx:Object label="Green" data="haloGreen" />
		<mx:Object label="Blue" data="haloBlue" />

	<mx:Panel id="panel" width="50%" paddingLeft="10" verticalGap="10">
		<mx:Repeater id="checkBoxRepeater" dataProvider="{arr}">
			<mx:TextInput id="textInput" />
		<mx:ControlBar horizontalAlign="right">
			<mx:Label id="status" />
			<mx:Button id="button"
					   label="Click me"
					   click="onClickHandler(event);" />

Open in new window

Warm Regards
Deepanjan Das

Author Comment

ID: 35009995
Thank You it was really Helpful

Featured Post

Take our survey for a chance to win!

As a valued customer of Targus, we’d like to ask you a few questions about us. As thanks, you will be automatically entered for a chance to win a $500 VISA gift card. To enter, just complete the survey by September 15, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question