Topic: Password strength meter
Could anybody code a password strength meter?
Strength meter would be active. While typing characters into password field meter would be updated, showing how many bits and characters.
Also I add check for re-enter script to button save as follows:
procedure frmDetails_btnSAVE_OnClick (Sender: string; var Cancel: boolean);
begin
if not (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
begin
ShowMessage('Please re-enter password correctly.');
frmDetails.edReEnterPassw.Clear;
end;
end;
It checks OK but it results in blocking save?
edit:
---------------
I used the following for checking re-enter with additional save button. It seems to be working OK but not sure if it's a correct approach.
procedure frmDetails_btnSAVE_OnClick (Sender: string; var Cancel: boolean);
begin
onClick1;
onClick2;
end;
procedure onClick1;
begin
if not (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
begin
ShowMessage('Please re-enter password correctly.');
frmDetails.edReEnterPassw.Clear;
end;
end;
procedure onClick2;
begin
if (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
begin
frmDetails.btnSAVEfake.Click;
end;
end;
Please see the attached sample project:
God... please help me become the person my dog thinks I am.