Hi Matt,

if you're thinking about the validators in general, another thing I'd
love to have is something like a defaultErrorMessage attribute which
automatically sets the value for all the more specific error
attributes if one doesn't specify those in particular.

Cheers
Kai

MC> I think someone else ran into this (maybe Mika?) but I don't
MC> remember if it had a work around.  This is something we're fixing
MC> in 2.0, I don't have a solution for you off the top of my head.

MC> Matt

MC> -----Original Message-----
MC> From: flexcoders@yahoogroups.com
MC> [mailto:[EMAIL PROTECTED] On Behalf Of Kai König
MC> Sent: Wednesday, August 17, 2005 6:56 AM
MC> To: flexcoders@yahoogroups.com
MC> Subject: [flexcoders] Changing the wrongLengthError in a DateValidator

MC> Hi all,

MC> another validator-related question:

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

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

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

MC> Works quite good, BUT doesn't work for wrongLengthError. The docs
MC> 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>.".

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

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

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

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

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

MC> Cheers
MC> Kai









MC> --
MC> Flexcoders Mailing List
MC> FAQ:
MC> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
MC> Search Archives:
MC> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
MC> Yahoo! Groups Links



 






MC> --
MC> Flexcoders Mailing List
MC> FAQ:
MC> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
MC> Search Archives:
MC> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
MC> Yahoo! Groups Links



 




-- 
Best regards,
 Kai                            mailto:[EMAIL PROTECTED]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hpdvqk2/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124357529/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</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