-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
After posting this message, I came across a blog entry
http://blog.wheelerstreet.com/?p=123 which shows me another way to
handle the Form Validation which I am trying
Graham Pearson wrote:
> 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
iQEVAwUBRx3mC3njLHMPlkANAQLjOgf/WCHWR8wpd3PDburOWT05WCK2HMlLy4Jf
mgGKsyFmDU1dcQZ7qLog0yDy+HVGd3T9vr5q6QOxWJwTj/JuV8Fvp0LfcIyFtIk3
qJ2ln/v2P3eD5VbsHJRwfTgQmmNSk6K+l6syTzf9YwvZ209o5gh5JRaM87TKhyPh
+oijqKpdZlYvYtxrYfPIOm0Vr+vufMkX9tHlAuGD71JMvuVs+EO0f9rEg5sNBXou
Qj1F82SrtB626y91p5V92xDwuXtsrNakMgqEpKNZP75TXt+fcN24cTbnIeiu/dhj
DVTsAOE7DQKqK2eCvgrCfLkjGqxDFqWyIkTo4XiPQboLrYYB8l6tmw==
=dzWv
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4743
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37