CustomValidator is similar to other .NET validator controls except that the validation process is controlled by the developers code either at the client-side or server-side.
You can build your validation code at server-side or client-side to stop the form from submitting when an entry is invalid. However, since WorkflowGen’s built-in validation is triggered at the client-side, and in order to combine the validation results to WorkflowGen’s validation dialog box without a page postback, a client-side scripted approach is suggested.
First, add a .NET
CustomValidator control to your form:
Make sure you change the error message to meet your needs. As well, the
Display attribute should be set to
None and the
ValidationGroup attribute must be set to
WFGENPage to combine your error message with WorkflowGen’s built-in message dialog box. The
Then, in your
CustomValidator. It returns the validation result
arguments.IsValid. If the validation result is
false, then the error message of your custom validator will appear in the WorkflowGen dialog box when submitting the form.
Note: Make sure your web form and WorkflowGen action meet the basic requirement for WorkflowGen built-in validation before adding the custom validator to ensure that the default validation is functioning. For more information, see My .NET validator does not trigger the validation error message.