87682

Question:
I have textinput within list itemrenderer like
<strong>main.mxml</strong>
<s:List
id="videoAttachmentsList"
itemRenderer.normalView="com.engage.discussion.attachment.renderers.VideoAttachmentRenderer"
>
<mx:button label="add" click=addevent(Event) />
<strong>VideoAttachmentRenderer.as</strong>
<TextInput styleName="commonTextInput"
prompt="Enter a video header"
id="headerText"
x="75" width="185" height="21"
bottom="5"
fontSize="10"
maxChars="30"/>
<fx:Declarations>
<mx:StringValidator source="{headerText}" property="text" required="true" maxLength="30" requiredFieldError="Please enter video header"/>
</fx:Declarations>
My doubts is when i click add button on (main.mxml) that time need validate headerText(Textinput)(VideoAttachmentRenderer.as) . is it possible to validate string withing itemRenderer. could u give any guidance ?
Answer1:override the set data method and trigger the validation in there