<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: applying validation to a field from managed code....</title><link>https://www.infopathdev.com:443/forums/thread/37334.aspx</link><pubDate>Mon, 19 Jan 2009 14:27:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37334</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37334.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=37334</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can add the data validation to a field using the below code.&lt;/p&gt;
&lt;p&gt;this.Errors.Add(&amp;lt;node of the field to which you want to add validation&amp;gt;, &amp;quot;&amp;lt;name of the validation&amp;gt;&amp;quot;, &amp;quot;&amp;lt;message&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to add this code by checking whether the pattern is correct or not using if condition.&lt;/p&gt;</description></item><item><title>Re: applying validation to a field from managed code....</title><link>https://www.infopathdev.com:443/forums/thread/37318.aspx</link><pubDate>Mon, 19 Jan 2009 11:10:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37318</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37318.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=37318</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you verify below link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://aspalliance.com/718"&gt;http://aspalliance.com/718&lt;/a&gt;&lt;/p&gt;</description></item><item><title>applying validation to a field from managed code....</title><link>https://www.infopathdev.com:443/forums/thread/37314.aspx</link><pubDate>Mon, 19 Jan 2009 10:45:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37314</guid><dc:creator>yugalb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37314.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=37314</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi&lt;/p&gt;&lt;p&gt;I have a Infopath form .i want to apply validation to field in main datasource.i want to do this using managed code..can anybody tell me how i can do this...actually i want do apply phone number validation to a field in maindatasource based on locale i.e if country is US then there should be a phone format and if country is japan, the phone format should be different.&lt;/p&gt;&lt;p&gt;its urgent..&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>