Hi all,

another validator-related question:

Having to validate for a date using a DateValidator, the requirements
are to just deliver one validation message if the validation fails.
Following the concept, I'd have to add a long list of attributes to my
validator call, as in:

<mx:DateValidator ... invalidCharError="blabla"
                      invalidFormatCharsError="blabla" ... />

So we thought it might be nice to subclass the DataValidator and to
define a defaultErrorMessage which we can pass into our own validator
class and internally, the class is responsible to overwrite the values
of the pre-defined errors.

Works quite good, BUT doesn't work for wrongLengthError. The docs
state:

>Error message when the length of the date doesn't match that of the
>inputFormat. Default is "Please type the date in the format
><i>inputFormat</i>.".

That means the default error might be something like:
"Please...format mm/dd/yyyy"

As far as I understand, I'd expect to be able to overwrite the default
with anything I like, but regardless to what I set the value for
wrongLengthError, Flex always adds the value of inputFormat to my
error message - I end up with something like

"This is my errortext and I want you to type it correct mm/dd/yyyy"

This is especially annoying with localized error messages in which the
inputFormat has to be at another place within the error message by
grammar: "Bitte nutzen Sie das Format dd.mm.yyyy in diesem Feld".

Is there a way to get rid of the automatic concatenation of the
inputFormat within the wrongLengthError of this validator?

Cheers
Kai








------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hcaovgm/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124294163/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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