Archive: Can't cancel a field validation


Can't cancel a field validation
Hi,

I have the following code in a custom page. the meaning of this code is that the user has to fill in a value in at least 1 of the 2 textboxes. When pressing cancel, the field validation goes on and the "wrong" error message appears. Is there a way to press cancel without getting the error message if nothing has been filled in?

dialog: InstallOptions::dialog "$PLUGINSDIR\ioC.ini"

ReadIniStr $5 $PLUGINSDIR\ioC.ini "Field 1" STATE
ReadIniStr $6 $PLUGINSDIR\ioC.ini "Field 2" STATE

StrCmp $6 "" next continue
next:
StrCmp $5 "" wrong end

wrong:
MessageBox MB_OK|MB_ICONINFORMATION "Please fill in at lease 1 of the 2 textfields!"
Goto dialog

continue:
StrLen $3 $6
StrLen $4 $5
IntCmp $3 5 next1 wrong
next1:
IntCmp $4 0 end wrong wrong
end:

Greets!


Compare the result of IO to "success", only then validate the text because that's when the user clicked next. Just like in this example: http://nsis.sourceforge.net/archive/....php?pageid=87