This is a type of validator that you can include on a page. The ID is ID_PasswordValidator (defined in IValidator.h), which has a text value of "Microsoft.Wizard.Validation.Password."

This validator works with two different text controls (controls that support IStaticText) and reports failure if they do not contain the same values. In other words, it fails if the Password and Confirm Password text boxes do not match.

Because this validator requires two controls, it needs more setup than other validators. The setup might look something like this:


PValidator pValidator;

Form()->AddValidator(IDC_EDIT_PASSWORD, ID_PasswordValidator, pMessage, &pValidator);

PStaticText pPassword2;

GetControlWrapper(View(), IDC_EDIT_PASSWORD2, CONTROL_STATIC_TEXT, &pPassword2);

pValidator->SetProperty(0, pPassword2);


First, you define the Confirm Password control as a “child” of the Password control. That way, if the form controller disables the Password control, it will also disable the Confirm Password control. Next, add a password validator to the form. Finally, provide the password validator with the interface to the Confirm Password control.

Because of the requirement for two controls, you must use code to set up this validator rather than the .config XML file.

Related Topics

Wizard Page Components