<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Field Level Validation</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Field Level Validation</description>
  <pubDate>Wed, 10 Jun 2026 05:18:43 -700</pubDate>
  <lastBuildDate>Thu, 01 Aug 2013 22:39:28 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4259</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Field Level Validation : Yes, WPF validation is not straight...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16689#16689</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 4259<br /><strong>Posted:</strong> 01-Aug-2013 at 10:39pm<br /><br />Yes, WPF validation is not straight forward. Works much better in Silverlight. It's often easier to use exception based validation in WPF. You found the right resources in our documentation. Follow those instructions and give exception based validation a try by changing&nbsp;VerifierOptions.ErrorNotificationMode as described here:&nbsp;<a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/verificati&#111;n-ui#HVerificati&#111;nwithaWPFUI" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/verification-ui#HVerificationwithaWPFUI</a>]]>
   </description>
   <pubDate>Thu, 01 Aug 2013 22:39:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16689#16689</guid>
  </item> 
  <item>
   <title>Field Level Validation :   I have changed the control...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16688#16688</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=131" rel="nofollow">-ook</a><br /><strong>Subject:</strong> 4259<br /><strong>Posted:</strong> 01-Aug-2013 at 7:04pm<br /><br /><div>I have changed the control to a TextBox thus simplifying the issue by using standard out of the box controls. I would expect a red outline to be displayed. I should note that I am using WPF.</div><div> </div><div>I have read: <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/cocktail-validati&#111;n" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/cocktail-validation</a></div><div>and <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/verificati&#111;n-ui" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/verification-ui</a></div><div>(this one seems to hint at more code required for WPF to get this to work)</div><div> </div><div>and the code sample at: <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/code-sample-validati&#111;n-wpf" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-sample-validation-wpf</a></div><div> </div><div> </div><div>My binding appears correct:</div><div>&lt;TextBox Text="{Binding ReportedBy, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=true}"/&gt;</div><div> </div><div> </div><div>In the model I have tried:</div><blockquote style="margin-right: 0px;" dir="ltr"><div>/// &lt;summary&gt;Gets or sets the person who reported the incident. &lt;/summary&gt;<br>        &#091;DataMember&#093;<br>        &#091;Required&#093;<br>        public string ReportedBy { get; set; }</div></blockquote><div> </div><div>and even added:</div><div> </div><blockquote style="margin-right: 0px;" dir="ltr"><div>/// &lt;summary&gt;Gets or sets the person who reported the incident. &lt;/summary&gt;<br>        &#091;DataMember&#093;<br>        &#091;Required&#093;<br>        &#091;IdeaBlade.Validation.RequiredValueVerifier(ErrorMessageResourceName = "ReportedBy")&#093;<br>        public string ReportedBy { get; set; }</div></blockquote><div> </div><div>If I attempt save the record it will display a validation error dialog listing the fields in question that are at fault, but still no difference to the TextBox</div><div> </div><div> </div><div>I have also added the custom style as recommended in the sample:</div><div> </div><div>&lt;Style TargetType=<span style="color: rgb163, 21, 21;">"{x:Type TextBox}"</span>&gt;<br>    &lt;Setter Property=<span style="color: rgb163, 21, 21;">"Validation.ErrorTemplate"</span>&gt;<br>      &lt;Setter.Value&gt;<br>        &lt;ControlTemplate&gt;<br>          &lt;DockPanel&gt;<br>            &lt;TextBlock Foreground=<span style="color: rgb163, 21, 21;">"Red"</span> FontSize=<span style="color: rgb163, 21, 21;">"20"</span>&gt;!&lt;/TextBlock&gt;<br>            &lt;AdornedElementPlaceholder/&gt;<br>          &lt;/DockPanel&gt;<br>        &lt;/ControlTemplate&gt;<br>      &lt;/Setter.Value&gt;<br>    &lt;/Setter&gt;<br>    &lt;Style.Triggers&gt;<br>      &lt;Trigger Property=<span style="color: rgb163, 21, 21;">"Validation.HasError"</span> Value=<span style="color: rgb163, 21, 21;">"true"</span>&gt;<br>        &lt;Setter Property=<span style="color: rgb163, 21, 21;">"ToolTip"</span> Value=<span style="color: rgb163, 21, 21;">"{Binding RelativeSource={RelativeSource Self},<br>          Path=(Validation.Errors)&#091;0&#093;.ErrorContent}"</span>/&gt;<br>      &lt;/Trigger&gt;<br>    &lt;/Style.Triggers&gt;<br>  &lt;/Style&gt;<br>    &lt;Setter Property=<span style="color: rgb163, 21, 21;">"Validation.ErrorTemplate"</span>&gt;<br>      &lt;Setter.Value&gt;<br>        &lt;ControlTemplate&gt;<br>          &lt;DockPanel&gt;<br>            &lt;TextBlock Foreground=<span style="color: rgb163, 21, 21;">"Red"</span> FontSize=<span style="color: rgb163, 21, 21;">"20"</span>&gt;!&lt;/TextBlock&gt;<br>            &lt;AdornedElementPlaceholder/&gt;<br>          &lt;/DockPanel&gt;<br>        &lt;/ControlTemplate&gt;<br>      &lt;/Setter.Value&gt;<br>    &lt;/Setter&gt;<br>    &lt;Style.Triggers&gt;<br>      &lt;Trigger Property=<span style="color: rgb163, 21, 21;">"Validation.HasError"</span> Value=<span style="color: rgb163, 21, 21;">"true"</span>&gt;<br>        &lt;Setter Property=<span style="color: rgb163, 21, 21;">"ToolTip"</span> Value=<span style="color: rgb163, 21, 21;">"{Binding RelativeSource={RelativeSource Self},<br>          Path=(Validation.Errors)&#091;0&#093;.ErrorContent}"</span>/&gt;<br>      &lt;/Trigger&gt;<br>    &lt;/Style.Triggers&gt;<br>  &lt;/Style&gt;</div>]]>
   </description>
   <pubDate>Thu, 01 Aug 2013 19:04:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16688#16688</guid>
  </item> 
  <item>
   <title>Field Level Validation : This sounds like a DevExpress...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16687#16687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 4259<br /><strong>Posted:</strong> 01-Aug-2013 at 5:53pm<br /><br />This sounds like a DevExpress issue. Implementing IDataErrorInfo is redundant. DevForce entities implement IDataErrorInfo out of the box. If the controls don't show an error, then it is an issue with the control or possibly the binding. I recommend you contact DevExpress support.&nbsp;<div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 01 Aug 2013 17:53:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16687#16687</guid>
  </item> 
  <item>
   <title>Field Level Validation :   HelloI have implemented validation...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16686#16686</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=131" rel="nofollow">-ook</a><br /><strong>Subject:</strong> 4259<br /><strong>Posted:</strong> 01-Aug-2013 at 5:39pm<br /><br />Hello<div>&nbsp;</div><div>I have implemented validation as per the TempHire reference application, and note that DataAnnotations may also be used on individual properties (I am using code first approach).</div><div>&nbsp;</div><div>I am using DevExpress controls that apparantly do not support dataannotations but rather the IDataErrorInfo approach. I have added the IDataErrorInfo interface to my class and have placed the correct validation code in the 'string IDataErrorInfo.this&#091;string columnName&#093;' method. Yet still the control does not show an error. I suspect it is an MVVM thing or the fact I seem to be mixing two types of validation.</div><div>&nbsp;</div><div>Anyone have any pointers?</div><div>&nbsp;</div><div>Thanks</div><div>Mark</div>]]>
   </description>
   <pubDate>Thu, 01 Aug 2013 17:39:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4259&amp;PID=16686#16686</guid>
  </item> 
 </channel>
</rss>