On 5/12/05, michael keirnan <[EMAIL PROTECTED]> wrote:
>  the errorString property of UIComponent causes the red borders and rollover
> error tip. errorString is set by the default validation listener when it
> gets errors.

You can just bind to errorString.  See this example:

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate Number validator -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
backgroundColor="#FFFFFF">

    <mx:Model id="CheckModel">
        <Age>{age.text}</Age>
    </mx:Model>

    <mx:Panel title="Number Validator Panel" backgroundColor="#0C8BF3">

        <mx:VBox>

            <mx:Form>

                <mx:FormItem label="Entre Age between 18 and 50: "
color="#FFFFFF">
                    <mx:TextInput id="age" width="200" color="#000000"/>
                </mx:FormItem>

            </mx:Form>

            <mx:Label text="*press enter to check validation." color="#FFCCCC"/>

        </mx:VBox>

    </mx:Panel>

    <mx:NumberValidator field="CheckModel.Age" integerError="Enter
Integer value"
                        minValue="18" maxValue="50" domain="int"/>

                <mx:Label text="{age.errorString}" />

</mx:Application>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to