Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to check for valid input?


2 replies to this topic

TAL

TAL
  • Members
  • 77 posts

Posted 21 May 2001 - 08:11

I need to know if there is a way for checking for valid input.
I have a dialog box that gets 2 values from the user, and i need to verify that he entered valid input only.
meaning that he did only use letters & numbers.

Thx,


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 21 May 2001 - 08:47

If all you need to do is ensure you have letters and digits you can use a masked edit control then invalid data can not be entered.

To do more complex validation you will need a custom action.  This should set a property so that wi can tell if it should proceed to the next dialog or not.  If you have a custom action CheckInput that sets a property TestResult you might have a events on the next button like

Event:  DoAction
Argument: CheckInput
Condition: 1

Event: NewDialog
Argument: MyNextDialog
Condition: TestResult="Valid"

Event: SpawnDialog
Argument:  ExplainErrorDialog
Condition: TestResult<>"Valid"