<?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 : Need fancy verifier..</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Need fancy verifier..</description>
  <pubDate>Fri, 10 Apr 2026 18:56:36 -700</pubDate>
  <lastBuildDate>Mon, 28 Apr 2014 11:33:54 -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=4684</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>Need fancy verifier.. : Unfortunately, we don&amp;#039;t currently...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17533#17533</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> 4684<br /><strong>Posted:</strong> 28-Apr-2014 at 11:33am<br /><br />Unfortunately, we don't currently support the creation of custom message per property via VerifierResult. You can certainly suggest it on our <a href="http://devforce.uservoice.com" target="_blank">DevForce UserVoice</a><div><br></div><div>Since a VerifierResult can only return one message for all properties specified, we have to somehow return specific VerifierResult for the specific property. That's why I suggested the approach above.&nbsp;<br><div><div><br></div><div><br></div></div></div>]]>
   </description>
   <pubDate>Mon, 28 Apr 2014 11:33:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17533#17533</guid>
  </item> 
  <item>
   <title>Need fancy verifier.. : I&amp;#039;m still not sure how this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17530#17530</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4684<br /><strong>Posted:</strong> 24-Apr-2014 at 3:06pm<br /><br />I'm still not sure how this will work. I don't have problem with triggering and processing properties. I don't even care which of those 3 properties triggered verifier.<br /><br />I do want to somehow return return multiple messages along with properties. <br /><br />Something like this: (obviously it's bad signature suggestion, but illustrates what I need)<br />return new VerifierResult(false, "MeesageForProperty1", "MessageForProperty2", properties.ToArray());<br />]]>
   </description>
   <pubDate>Thu, 24 Apr 2014 15:06:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17530#17530</guid>
  </item> 
  <item>
   <title>Need fancy verifier.. : My apologies. I misunderstood...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17529#17529</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> 4684<br /><strong>Posted:</strong> 24-Apr-2014 at 2:58pm<br /><br />My apologies. I misunderstood your requirements.<div><br></div><div>Currently, ReasonEx property is the only one that's triggering this DelegateVerifier. And because of that, you're limited to providing one custom message.</div><div><br></div><div>Your requirement is that you want to provide custom message per each property that's involved in this validation. To do this, you have to attach a Verifier to the other 3 properties and make them trigger the validation. This is the only way that I can think of to do what you want.</div><div><br></div><div>See if you can try the following:</div><div><br></div><div>1. Create a DelegateVerifier that you would attach to these 3 properties. Let's call this DriverCarrierDelegateVerifier. Note that you can subclass the RequiredValueVerifier. This is a pre-defined DevForce Verifier.&nbsp;</div><div><br></div><div>See&nbsp;http://drc.ideablade.com/devforce-2012/bin/view/Documentation/validation-create-custom-verifier#HSubclassingapre-definedverifier for more details.</div><div><br></div><div>2. Within it, since you know which property is triggering the Verifier through TriggerContext, you can return a VerifierResult with its customized message per property.</div><div><br></div><div>3. In your ReasonEx DelegateVerifier, call,</div><div><br></div><div>var verifiersToExecute = new List&lt;Verifier&gt; { DriverCarrierDelegateVerifier };</div><div>verifierContext.VerifierEngine.Execute(entity, verifiersToExecute, verifierContext);</div><div><br></div><div>The above Execute call will trigger the DriverCarrierDelegateVerifier and in turn will trigger the 3 properties to be validated.</div><div><br></div><div>Please let me know how it goes.</div>]]>
   </description>
   <pubDate>Thu, 24 Apr 2014 14:58:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17529#17529</guid>
  </item> 
  <item>
   <title>Need fancy verifier.. : Yes, I understand. Any of the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17526#17526</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4684<br /><strong>Posted:</strong> 24-Apr-2014 at 2:19pm<br /><br />Yes, I understand. Any of the 3 properties can trigger verifier. But what I want is _different_ messages over each field. So, if this verifier returns verification result for 3 properties I'd like to specify different messages too.]]>
   </description>
   <pubDate>Thu, 24 Apr 2014 14:19:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17526#17526</guid>
  </item> 
  <item>
   <title>Need fancy verifier.. : Hi katit,In your DelegateVerifier,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17524#17524</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> 4684<br /><strong>Posted:</strong> 24-Apr-2014 at 2:17pm<br /><br />Hi katit,<div><br></div><div>In your DelegateVerifier, you should have access to the TriggerContext which gives you information on which property triggers the verifier. You can access it through TriggerContext.TriggerItem.MemberName.</div>]]>
   </description>
   <pubDate>Thu, 24 Apr 2014 14:17:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17524#17524</guid>
  </item> 
  <item>
   <title>Need fancy verifier.. : In Silverlight I have requirement...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17517#17517</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4684<br /><strong>Posted:</strong> 23-Apr-2014 at 7:08am<br /><br />In Silverlight I have requirement for Verifier that works like so.. <br /><br />1. 3 fields triggering same verifier. A-Type, B-Customer1, C-Customer2<br />2. When specific (A) selected I need to make sure either (B) or (C) selected.<br /><br />I wrote VerifierProvider. Created DelegateVerifier and created static VerifierResult.<br /><br />Everything works 99%. Here is snippet where I decide what error to return:<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />if (entity.ReasonEx == ReasonEnum.Lumper)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var properties = new List&lt;string&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!entity.DriverKey.HasValue && !entity.CarrierKey.HasValue)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;properties.Add(PropertyMetadata.DriverKey.Name);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;properties.Add(PropertyMetadata.CarrierKey.Name);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (string.IsNullOrEmpty(entity.TripId)) properties.Add(PropertyMetadata.TripId.Name);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (properties.Any())<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new VerifierResult(false, "Required when Lumper reason selected", properties.ToArray());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br /></pre></td></tr></table><br /><br />So, if specific "reason" selected and no driver or carrier specified I return both driver and carrier as errrors. Problem is, it's little confusing to user, because they all show as "Required when.." on UI.<br /><br />Ideally I'd like to attach custom message to each property. But VerifierResult allows me to do multi-property but only one message. In this case I need to say "Either driver OR carrier required when..."<br />]]>
   </description>
   <pubDate>Wed, 23 Apr 2014 07:08:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4684&amp;PID=17517#17517</guid>
  </item> 
 </channel>
</rss>