Thanks again.

Regards,

Ketan Bengali
Multimedia Programmer,
Silver Communication Pvt. Ltd.,
Pune.



Matt Chotin wrote:

What I do when I want two validators on one field is create a third validator and then in its validate method call the other two validators (this is one reason we have those static methods).

<mx:Validator field=”myField” validate=”doBothValidators(event.validator)” />

<mx:Script>

Function doBothValidators(validator : Validator) : Void

{

StringValidator.validateString(validator, myField, {options…});

OtherValidator.validate…(…);

}

</>

We are trying to see what we can do to make the validator system a little more developer-friendly in the next release.

HTH,

Matt

------------------------------------------------------------------------

*From:* Ketan Bengali [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, March 08, 2005 11:04 PM
*To:* [email protected]
*Subject:* [flexcoders] Another on validators

Is there any way where in I can have 2 (custom) validators for 1 field.
Lets say, I have written components which can be used for various fields
in a form or many forms spread across the application(s).

I would want to reuse them instead of copying the same
stuff in diff. validators.

If this cannot be done in current version of FLEX I think
this feature should be added in the future one.

Also there should be some way to add other field's value
in the validator of a field.
May be one wants to pass different parameters to a validator the way we
pass in Standard validators

In <mx:Validators> tag I cannot add custom properties from .mxml file
similar to standard
validators (minLength, maxLength etc.)

Thanks.

--
Regards,

Ketan Bengali
Multimedia Programmer,
Silver Communication Pvt. Ltd.,
Pune.




*Yahoo! Groups Sponsor*
ADVERTISEMENT
click here <http://us.ard.yahoo.com/SIG=129jsae9l/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1110447061/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075>




------------------------------------------------------------------------
*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]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/>.






Reply via email to