<?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>Validate Field Programmatically?</title><link>https://www.infopathdev.com:443/forums/thread/89867.aspx</link><pubDate>Thu, 16 May 2013 21:47:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:89867</guid><dc:creator>RobSil1976</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/89867.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=89867</wfw:commentRss><description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;I have a repeating table that the user types&amp;nbsp; values into, then hits a button and the values are parsed and moved to a 2nd repeating table.&amp;nbsp; Just working on the validation logic (e.g. field has value, field 1 = field 2, date is &amp;lt; today&amp;#39;s date, etc.).&amp;nbsp;&amp;nbsp; When I invalidate a field I do this:&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;

&lt;pre&gt;Errors.Add(navToField,&amp;quot;Error&amp;quot;, &amp;quot;Error: The selected row has an error in one field.&amp;quot;);

&lt;/pre&gt;&lt;p&gt;But it doesn&amp;#39;t seem to clear out the errors when I type a new value in.&amp;nbsp; Curious what the best approach is to programmatically set an error that is cleared automatically?&amp;nbsp; I can just show MessageBoxes, but I would really like the fields to get highlighted in red since I can show all errors at once that way.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Rob&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>