The problem with that example is that it validates a data model with multiple fields, but the validator only takes a single listener property to specify where to display the validation error. Could your custom validator add additional listener properties, as does the Flex CreditCardValidator, so that you could write the error message to the appropriate input control?
 
Stephen
 
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of julien castelain
Sent: Thursday, October 19, 2006 4:28 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Custom validator example from Help not working?

Hi Jonas,
 
There's a great quickstart on Validators

Enjoy :)
 
 
 
On 10/19/06, Jonas Windey <[EMAIL PROTECTED]com> wrote:

Hi,

I need to validate multiple fields, and I saw the help contained an example
for validating multiple fields.

You can find it in Help > Creating and Extending Flex 2 Components >
Creating Nonvisual Flex Components > Creating Custom Validators,
Under Example: Validating multiple fields

In the example they say you can use the subfield attribute to the
ValidationResult.
Now the problem is, this isn't working at all. It still validates the 3
input fields, but it always sets the errormessage to the first field (even
though they say in the example "This inclusion permits Flex to identify the
input component that caused the error, and to highlight that component in
the application."

Anyone got a clue? What I need to do is, I have 3 fields, and at least one
of the 3 needs to be filled in. If none are filled in, all 3 fields need to
display an errormessage.

Thanks.

Jonas


__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to