<?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: How to find whether a field is a required field</title><link>https://www.infopathdev.com:443/forums/thread/24004.aspx</link><pubDate>Fri, 26 Oct 2007 06:58:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24004</guid><dc:creator>anujQA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24004.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24004</wfw:commentRss><description>&lt;p&gt;OK! Found the solution.&lt;/p&gt;
&lt;p&gt;Please refer this link.&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;a href="http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.office.developer.automation&amp;amp;tid=cc4813b3-b5e4-4583-91d8-f819096fb293&amp;amp;p=1"&gt;&lt;font face="Calibri" color="#800080" size="3"&gt;http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.office.developer.automation&amp;amp;tid=cc4813b3-b5e4-4583-91d8-f819096fb293&amp;amp;p=1&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;span style="COLOR:#1f497d;"&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;span style="COLOR:#1f497d;"&gt;Anuj Chaudhary&lt;/span&gt;</description></item><item><title>Re: How to find whether a field is a required field</title><link>https://www.infopathdev.com:443/forums/thread/23950.aspx</link><pubDate>Wed, 24 Oct 2007 09:06:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23950</guid><dc:creator>anujQA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=23950</wfw:commentRss><description>&lt;p&gt;Thanks Shirz but this approach is not working for me. Actually, I am trying to open an existing form through my code.&lt;/p&gt;
&lt;p&gt;I want to know whether a field in this form&amp;nbsp;is required or not.&lt;/p&gt;
&lt;p&gt;When I try to use the property Xdocument.Errors, it throws an exception System.InvalidCastException.&lt;/p&gt;
&lt;p&gt;Is there a different way of knowing which fields are required ones.&lt;/p&gt;
&lt;p&gt;Hope you can help me finding a solution for this problem.&lt;/p&gt;
&lt;p&gt;Anuj Chaudhary&lt;/p&gt;</description></item><item><title>Re: How to find whether a field is a required field</title><link>https://www.infopathdev.com:443/forums/thread/23935.aspx</link><pubDate>Tue, 23 Oct 2007 20:14:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23935</guid><dc:creator>Shiraz Cupala</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23935.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=23935</wfw:commentRss><description>&lt;p&gt;The easiest way to do this would be to search through the errors collection and see if that node is listed. Of course this only works if the field is not yet filled out.&lt;/p&gt;
&lt;p&gt;Similarly you can determine that way if there is an existing error in a node. If you want to verify validation upon entry the onValidate event should do the trick.&lt;/p&gt;
&lt;p&gt;Thanks, Shiraz&lt;/p&gt;</description></item><item><title>How to find whether a field is a required field</title><link>https://www.infopathdev.com:443/forums/thread/23912.aspx</link><pubDate>Tue, 23 Oct 2007 07:12:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23912</guid><dc:creator>anujQA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23912.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=23912</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need to find out whether a field is a required field (cannot be blank)&amp;nbsp;or not through code.&lt;/p&gt;
&lt;p&gt;Any ideas on how can I find that a particular field is a reqired field or not.&lt;/p&gt;
&lt;p&gt;Also, if enter an invalid entry&amp;nbsp;e.g. a character in date field, the filed gets outlined in red to point out that it is an invalid entry.&lt;/p&gt;
&lt;p&gt;How can I determine through code whether an invalid entry has been made or not.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any suggestions.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Anuj Chaudhary&lt;/p&gt;</description></item></channel></rss>