how to check if there are validation errors in the Infopath form?

Hi All,

Does anyone know how to check if there are any data validation errors in the form using Code? Each field of my form is checked against incorrect formatting using Data Validation feature - when there is a problem field is marked in red and error message appears... I've also disabled default Submit button and programmed my own but I need to find the way to check if all fields are filled in correctly before the form is sent - any ideas?


Who is Participating?
Clay FoxDirector of Business IntegrationCommented:
This has to be done manually to my knowledge, right code to conditionally check each value or put a rule on each field to flag a validation field if it does not validate. Then you have a master validation flag.

The default validation is pretty limited practically since you have to rely on the user to see it and often some fields may not be exposed when submitting.

So I typically use my own rules and checks to manage the form is complete either on the submit or beforehand.
fortresAuthor Commented:
Hi Clayfox

 "rule on each field to flat a validation field"  -of course!  I was so focused on Data Validation that I forgot about simple rules - thanks mate!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.