Unfortunately no. This is hardcoded in the TInputDirWizardPage.NextButtonClick
method, which internally validates all the edit boxes by calling ValidateCustomDirEdit
function, which doesn't care if the edit has been left intentionally empty; it just checks if it contains a valid directory path. Or, in other words, the TInputDirWizardPage
fields are not optional, they must contain valid paths at this time.
Well, I don't feel this was an expected behavior. If you compare file and dir input page, they differ. Whilst in the file input page you can leave edit boxes empty, in dir input page you cannot. I think, that would be enough if there would be a check if the edit box is not empty and only if it's not, validate its content. You would be able to check whether the edit is empty by yourself (if you'd require mandatory field), and stop the user on that page, but you are not able to suppress that validation if the edit is empty.
In your situation I would consider using TInputFileWizardPage
as you were talking about a file input, or creating your own directory input page.