<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Code to validate a form?</title><link>https://www.infopathdev.com:443/forums/thread/73758.aspx</link><pubDate>Tue, 10 Jan 2012 20:59:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73758</guid><dc:creator>arduk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73758.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73758</wfw:commentRss><description>&lt;p&gt;don&amp;#39;t worry, someone has pointed me in the right direction.&lt;/p&gt;
&lt;p&gt;this.Errors gives you a collection of the errors on the form...&lt;/p&gt;</description></item><item><title>Code to validate a form?</title><link>https://www.infopathdev.com:443/forums/thread/73683.aspx</link><pubDate>Tue, 10 Jan 2012 01:20:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73683</guid><dc:creator>arduk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73683.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73683</wfw:commentRss><description>&lt;p&gt;I have a form which is being used to collect data, but rather than being submitted, I am using c# code to run some SQL to update a database (the form is only being used in the infopath client)&lt;/p&gt;
&lt;p&gt;I have added data validation rules to the form, and prior to running the SQL, I would like to ensure that the data in the form has passed all validation rules.&lt;/p&gt;
&lt;p&gt;Can someone tell me how to validate a form using code? &lt;/p&gt;
&lt;p&gt;I am sure this is really simple, but so far, I haven&amp;#39;t been able to find what I am looking for.&lt;/p&gt;
&lt;p&gt;Thanks in advance for any assistance!!&lt;/p&gt;</description></item></channel></rss>