Hi !
I've tried to find an approuch to validate fields of a data form. Actually, my form looks like:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas .... creationComplete="onComplete()" >
<mx:Metadata>
[Event("validate")]
</mx:Metadata>
<mx:Script>
public function validate(event:Object) : Void {
validator.validate();
}
public function onComplete() : Void {
this.addEventListener("validate",this.validate);
this.dispatchEvent(new Event("validate"));
}
</mx:Script>
<mx:StringValidator id="validator"
source="{name}"
property="text"
required="true"
requiredFieldError="Field is empty."/>
<mx:Form label="test">
<mx:FormItem label="Name" fontWeight="bold">
<mx:TextInput id="name" editable="true" maxChars="30" width="300"/>
</mx:FormItem>
.....
Running this code I have ever had a Flash Player error:
"Error: The source attribute must be specified when the property attribute is specified.".
I'm using Flash Player 8.5.
Any ideas ?
Thanks in advance !
Michel.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

