<?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 : Validate sometimes null property</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Validate sometimes null property</description>
  <pubDate>Sun, 12 Apr 2026 20:31:13 -700</pubDate>
  <lastBuildDate>Wed, 09 Nov 2011 04:56:30 -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=3086</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>Validate sometimes null property :   Denis,Works perfectly.Thanks,Steve...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12026#12026</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1315" rel="nofollow">spudcud</a><br /><strong>Subject:</strong> 3086<br /><strong>Posted:</strong> 09-Nov-2011 at 4:56am<br /><br />Denis,<div>&nbsp;</div><div>Works perfectly.</div><div>&nbsp;</div><div>Thanks,</div><div>&nbsp;</div><div>Steve</div>]]>
   </description>
   <pubDate>Wed, 09 Nov 2011 04:56:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12026#12026</guid>
  </item> 
  <item>
   <title>Validate sometimes null property : Hi Steve;You need to override...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12025#12025</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3086<br /><strong>Posted:</strong> 08-Nov-2011 at 7:33pm<br /><br />Hi Steve;<div><br></div><div>You need to override the <a href="http://drc.ideablade.com/Api&#068;ocumentati&#111;n/IdeaBlade.Validati&#111;n~IdeaBlade.Validati&#111;n.PropertyValueVerifier~HandleNullPropertyValue.html" target="_blank">HandleNullPropertyValue </a>method for nulls to be handled by the VerifyValue method.</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>// Can be overridden to return a custom null handling result or if null is returned,</div><div>// nulls will be handled by the VerifyValue method</div><div>protected override VerifierResult HandleNullPropertyValue(TriggerContext triggerContext, VerifierContext verifierContext) {&nbsp;</div><div>&nbsp; &nbsp; return null;</div><div>}</div></div><div></pre></td></tr></table></div>]]>
   </description>
   <pubDate>Tue, 08 Nov 2011 19:33:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12025#12025</guid>
  </item> 
  <item>
   <title>Validate sometimes null property :   I have a date property that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12023#12023</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1315" rel="nofollow">spudcud</a><br /><strong>Subject:</strong> 3086<br /><strong>Posted:</strong> 08-Nov-2011 at 5:22am<br /><br /><p>I have a date property that is nullable in the database but based on business logic may not be null in specific cases. To accomplish this I figured inheriting a class from PropertyValueVerifier would be the best way. The VerifyValue method is called when the date is changed to another date but does not get called when the date goes to null. Is this a bug or am I doing something wrong?</p><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>...</div><div>return new NullEndDateVerifier(<br>&nbsp;&nbsp; typeof(StatusRqst),<br>&nbsp;&nbsp; EntityPropertyNames.EndDateTimeDt,<br>&nbsp;&nbsp; null,<br>&nbsp;&nbsp; true);</div><div>...</div><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public class NullEndDateVerifier : PropertyValueVerifier<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public NullEndDateVerifier(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type a_entityType,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string a_sPropertyName,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string a_sDisplayName = null,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool? a_bShouldTreatEmptyStringAsNull = null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : base(new PropertyValueVerifierArgs(a_entityType, a_sPropertyName, false, a_sDisplayName, a_bShouldTreatEmptyStringAsNull))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public NullEndDateVerifier(PropertyValueVerifierArgs a_verifierArgs)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : base(a_verifierArgs)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected override VerifierResult VerifyValue(object itemToVerify, object valueToVerify, TriggerContext triggerContext, VerifierContext verifierContext)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new VerifierResult(true);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><div></pre></td></tr></table></div><div>&nbsp;</div><div>Thanks,</div><div>Steve</div>]]>
   </description>
   <pubDate>Tue, 08 Nov 2011 05:22:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3086&amp;PID=12023#12023</guid>
  </item> 
 </channel>
</rss>