My web form is submitted even if I have not provided input for required fields.
There are two possible causes for this issue:
If you use your own submit button with a custom ID (e.g.
btnSubmit) instead of the default WorkflowGen submit button ID (
SubmitButton), you need to provide the following attribute:
ValidationGroup = WFGENPage. For more information, see the My .NET validator does not trigger the validation error message article.
To make sure your custom code functions correctly for debugging, you can do the following:
Add a regular .NET button with an ID not equal to
ValidationGroup=WFGENPage. It will just perform a post back of your web form without submitting it to WorkflowGen while it will still trigger WorkflowGen form validation process.
alert()function to show your custom validation result. If the alert is not triggered this may signify that a line of code breaks. You can consider using an external debugger such FireBug to trace which line causes the error.