I need to prevent users from entering . at the end of the path entered in the directory edit box.
For example, the path cannot be:
C:\Program Files\InnoSetup.
How can I validate the directory edit box input, or how can I prevent users from entering . to the end of the path ?
To automatically delete all dots from the end of a target directory, you can use this script. You haven’t answered my question, what you want to do when a dot is found at the end of the path, so I chose just this way to show up. Note that this will delete all dots from the end of a folder string, so from a path like:
this script makes:
Here is the script:
There are of course another ways to validate the path, you can e.g. let the user enter the path with dots at the end and validate it when you move to the next step in the wizard etc. But you just didn’t specified what do you mean with your how to write validation question.