Thursday, April 11, 2013

Checking for validation error programatically in InfoPath

In case if you are writing a code in button click event of InfoPath page and you would like to validate the required fields input or any other validation, then here is a one liner code that you need to write.


if the count is 0 that means there is no error, else there are errors.

Happy coding!!

No comments:

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to