-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Now I am trying to work with Flex Forms and having an issue with the
validation. I can get the validation to work if I have only two fields
on the form and if both fields have been entered then the Button will
become enabled so the user can click on it to submit the form. Now I
have taken the same code and tried to duplicate it for a form that has
6 Required Fields and 1 Optional field. When I go through the form,
after I enter the first 2 required fields the Button on the form will
be enabled.
Here is my code:
private function AccountRegisterFormValidation(event:Event):void {
AccountRegisterFocusControl = event.target as DisplayObject;
AccountRegisterFormValid = true;
AccountRegisterFormEmpty = (AccountRegisterFirstName.text == "" &&
AccountRegisterLastName.text == "" && AccountRegisterEmail.text == ""
&& AccountRegisterUsername.text == "" && AccountRegisterPassword.text
== "" && AccountRegisterVerifyPassword.text == "");
AccountRegisterValidation(AccountRegisterFirstName_Validator);
AccountRegisterValidation(AccountRegisterLastName_Validator);
AccountRegisterValidation(AccountRegisterEmail_Validator);
AccountRegisterValidation(AccountRegisterUsername_Validator);
AccountRegisterValidation(AccountRegisterPassword_Validator);
AccountRegisterValidation(AccountRegisterVerifyPassword_Validator);
}
private function AccountRegisterValidation(validator:Validator):Boolean {
var validatorSource:DisplayObject = validator.source as DisplayObject;
var suppressEvents:Boolean = (validatorSource !=
AccountRegisterFocusControl);
var event:ValidationResultEvent = validator.validate(null,
suppressEvents);
var currentControlIsValid:Boolean = (event.type ==
ValidationResultEvent.VALID);
AccountRegisterFormValid = AccountRegisterFormValid &&
currentControlIsValid;\
return currentControlIsValid;
}
Now these 2 functions are the same as my AccountLoginValidation and
AccountLoginFormValidation which works on the Account Login Form
ViewStack. Anyone see what I am missing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEVAwUBRx0ouHnjLHMPlkANAQIoXwf/R6Vdui8cqW4x+AohziIBig4TWiHGUCwl
XtOpNKn8dymocLDSTNHFC62VvqxgltfIuajxMwImIZMfAZV9mcaEf2RabTUSLMae
orPTu4eWvD6CbNaDL5OWeSfzF89OdN2K4t1bXGvp+sNTm+hTiwdYHzwvzkxYi4L0
KoUpqGoyxaofMc8RVfLWao4XcPqU3BFisGnBlhlxpwipRfvbgqnLPKnOJVHA0Ry7
ClrVPjUCgQQbdjXOkn9BGcoHebAbUxMB/TVZ4zzwovzWL5Lz+uzD3tlUuwWLUQAC
HgZtDMpTrg39RH6wWPbg7CtuS1DlY1tbBv3oW2N9ekJkzjxhNYqtTg==
=zaQU
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4742
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37