I try to set specific range of values that accepted from user inputs within installation. For example, port field just accept range from 10000-20000.
I try to use th
Just validate the input, display error message and make sure the NextButtonClick
event function returns False
:
function NextButtonClick(CurPageID: Integer): Boolean;
var
ServerPortInt: Integer;
begin
Result := True;
if CurPageID = AdminDataPage.ID then
begin
ServerPort := AdminDataPage.Values[3];
ServerPortInt := StrToIntDef(ServerPort, -1);
if (ServerPortInt < 10000) or (ServerPortInt > 20000) then
begin
MsgBox('Please enter port in range 10000-20000.', mbError, MB_OK);
WizardForm.ActiveControl := AdminDataPage.Edits[3];
Result := False;
end;
end;
end;