Thanks Matt.

Regards,

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



Matt Chotin wrote:

Validators can’t take binding expressions as values. The easiest thing to do is write a simple Validator with a custom handler that will confirm the password and confirm_password are equal.

Something like this:

<mx:Validator field=”confirm_password” validate=”checkConfirm(event.validator)” />

<mx:Script>

Function checkConfirm(validator : mx.validators.Validator)

{

if (confirm_password != password)

{

Validator.validationError(“mismatch”, “The confirmation and password fields do not match”);

}

}

</mx:Script>

Matt

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

*From:* Ketan Bengali [mailto:[EMAIL PROTECTED]
*Sent:* Sunday, March 06, 2005 10:54 PM
*To:* [email protected]
*Subject:* [flexcoders] Passing value to custom validator

I have 2 fields : "password" & "confirm_pasword"
I have made a custom validator for confirm password.

How do I pass the value of passsword to confirm_password.
Tried but not getting it. Have declared a public variable "myPwd" in the
as file
and passing it in this way: myPwd="{pwd.text}"


But while the validator gets executed it shows undefined as the value for myPwd


Can anybody help me ?

Thanks.

--
Regards,

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




*Yahoo! Groups Sponsor*
ADVERTISEMENT
click here <http://us.ard.yahoo.com/SIG=129idd2gs/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1110352002/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