kenara
|
| Posted: 05/05/2002, 7:00 PM |
|
I want to compare the new and confirmed password when users want to change the password. In the confirmed password text property can I just change the validation rule "=new_password".
|
|
|
 |
Nicole
|
| Posted: 05/08/2002, 6:45 AM |
|
Hello,
I assume that you have added textbox for password confirmation and no table field is selected as its source. So the problem is to create event and display warning message. Ok. Create OnValidate event for the form(!) and here is sample code:
PHP
global $form_name;
$passw = $form_name->password_field->Value;
$confirm = $form_name->confirm_field->Value;
if ($passw != $confirm)
{
$form_name->Errors->addError("<font color = red><b>Password and confirmation do not match</b></font>");
$form_name->confirm_field->SetValue("");
}
ASP
Dim passw: passw = ""
Dim confirm: confirm = ""
passw = form_name.password_field.value
confirm = form_name.confirm_field.value
if CStr(passw)<> CStr(confirm) then
form_name.Errors.addError("<font color = red><b>Password and Confirm do not match</b></font>")
form_name.confirm_field.value = ""
end if
|
|
|
 |
|