HI,

> It looks like once for the Year and once for the Month, but the test is only
> expecting one.
Yep that's the issue.

Here some code for en_US locale that does the same:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           initialize="init(event)">
        <fx:Script>
                <![CDATA[
                        import mx.events.FlexEvent;
                        import mx.events.ValidationResultEvent;
                        
                        protected function init(event:FlexEvent):void
                        {
                                var results:ValidationResultEvent = 
dv.validate("1971 16 03"); // default is MM DD YYYY
                                
                                for (var i:int; i <  results.results.length; 
i++)
                                {
                                        trace(i + ": " + 
results.results[i].errorMessage);
                                }
                        }
                        
                ]]>
        </fx:Script>
        
        <fx:Declarations>
                <mx:DateValidator id="dv" />    
        </fx:Declarations>
        
</s:Application>

It's adding the wrong length twice as the month is not the correct length and 
the year is not the correct length.

I'm not sure if you should get 2 wrong length or only one. Any opinions?

The 4.6/4.8/4.9.1 SDK only put in one but that may not be actually correct and 
the test is testing the expected behaviour and not the correct one?

It would be simple enough so that only one wrong length error was added if 1 or 
more parts of the date were the wrong length.

Thanks,
Justin

Reply via email to