<?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 : Validation Bullets</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Validation Bullets</description>
  <pubDate>Fri, 17 Apr 2026 02:43:10 -700</pubDate>
  <lastBuildDate>Wed, 10 Oct 2007 12:26:52 -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=484</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>Validation Bullets :         Just to clarify,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1541#1541</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=51" rel="nofollow">eileenv</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 10-Oct-2007 at 12:26pm<br /><br /><BR><TABLE cellSpacing=0 cellPadding=1 width="98%" align=center ="#000000"><T><T><TR><TD><TABLE height=250 cellSpacing=0 cellPadding=2 width="100%" ="#ffffff"><T><T><TR><TD vAlign=top ="text"><!--// /* Message  -->Just to clarify, verifiers that are added via the static method decorated with the &#091;VerifierProvider&#093; attribute, are set with ExecutionModes=InstanceAndOnPostsetTriggers by default. <DIV>&nbsp;</DIV><DIV>This code would have been sufficient to execute preset:</DIV><DIV>&nbsp;</DIV><DIV><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">Verifier</SPAN> GetEmailAddressVerifier(<SPAN style="COLOR: #2b91af">PropertyDescriptor</SPAN> pEmailDescriptor)<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><?:NAMESPACE PREFIX = O /><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">RegexVerifier</SPAN> v = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">RegexVerifier</SPAN>(pEmailDescriptor, <SPAN style="COLOR: blue">true</SPAN>, <SPAN style="COLOR: #2b91af">NamedRegexPattern</SPAN>.Email);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.ExecutionModes = <SPAN style="COLOR: #2b91af">VerifierExecutionModes</SPAN>.OnPresetTriggers;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> v;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P></DIV></TD></TR></T></T></TABLE></TD></TR></T></T></TABLE><span style="font-size:10px"><br /><br />Edited by eileenv - 10-Oct-2007 at 12:32pm</span>]]>
   </description>
   <pubDate>Wed, 10 Oct 2007 12:26:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1541#1541</guid>
  </item> 
  <item>
   <title>Validation Bullets : From looking at the help files...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1526#1526</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 10-Oct-2007 at 7:58am<br /><br /><P>From looking at the help files I original thought that it always verified. I was wrong. I added the following to get it to verify preset.</P><DIV><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">Verifier</SPAN> GetEmailAddressVerifier(<SPAN style="COLOR: #2b91af">PropertyDescriptor</SPAN> pEmailDescriptor)<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">RegexVerifier</SPAN> v = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">RegexVerifier</SPAN>(Descriptors.Email, <SPAN style="COLOR: blue">true</SPAN>, <SPAN style="COLOR: #2b91af">NamedRegexPattern</SPAN>.Email);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.AddTrigger(pEmailDescriptor);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.ExecutionModes = <SPAN style="COLOR: #2b91af">VerifierExecutionModes</SPAN>.OnPresetTriggers;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> v;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN><B style="mso-bidi-font-weight: normal"><o:p></o:p></B></P></DIV>]]>
   </description>
   <pubDate>Wed, 10 Oct 2007 07:58:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1526#1526</guid>
  </item> 
  <item>
   <title>Validation Bullets : I should have actually answered...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1517#1517</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=63" rel="nofollow">TrevLeyb</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 09-Oct-2007 at 2:32pm<br /><br /><DIV>I should have actually answered your question ;-) </DIV><DIV>&nbsp;</DIV><DIV>Verification is only triggered based on the setting of the ExecutionMode which needs to be defined as PreSet, PostSet or Instance. the other thing to check is that you have turned on Before/After validation in the Object Mapper options so that it generates the BeforeSetValue and AfterSetValue calls. It is these calls that execute verification against an object when you set the value through the property. </DIV><DIV>&nbsp;</DIV><DIV>Looking at your code, the verifier will only be called by the Save operation is it will be an INSTANCE verification. You need to explicitly call the verification engine asking it to verify as part of your Getter/Setter for the property that is associated with this verification (if that makes sense). </DIV><DIV>&nbsp;</DIV><DIV>Trevor</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by orcities</strong></em><br /><br />I have just created my first Verifier for an EmailAddress. The problem is that the validation is only being performed when the SaveAll is being used.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>On some of my other properties that have set lengths and such they are being thrown immidiately.&nbsp; I was looking at the documentation and this is the way it is suppose to happen.</DIV><DIV>&nbsp;</DIV><DIV>Is there a reason it is only verifying after a save?</DIV><DIV></td></tr></table> </DIV>]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 14:32:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1517#1517</guid>
  </item> 
  <item>
   <title>Validation Bullets : I will take a look at it and let...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1516#1516</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 09-Oct-2007 at 2:10pm<br /><br />I will take a look at it and let you know. ]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 14:10:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1516#1516</guid>
  </item> 
  <item>
   <title>Validation Bullets : I don&amp;#039;t know if it will help,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1515#1515</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=63" rel="nofollow">TrevLeyb</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 09-Oct-2007 at 2:04pm<br /><br />I don't know if it will help, but there is a white paper which discusses Verification and how to use it available from the Ideablade website. I think it answers your question on when triggering and verification is fired. <DIV>&nbsp;</DIV><DIV>I'd be keen on any feedback anyway (I am the author) if it does not cover topics which you feel it should. </DIV><DIV>&nbsp;</DIV><DIV>The link is <a href="http://www.ideablade.com/PDF/Verificati&#111;nWhitepaper.pdf" target="_blank">http://www.ideablade.com/PDF/VerificationWhitepaper.pdf</A></DIV>]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 14:04:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1515#1515</guid>
  </item> 
  <item>
   <title>Validation Bullets : I have just created my first Verifier...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1513#1513</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 484<br /><strong>Posted:</strong> 09-Oct-2007 at 1:27pm<br /><br />I have just created my first Verifier for an EmailAddress. The problem is that the validation is only being performed when the SaveAll is being used.&nbsp; <DIV>&nbsp;</DIV><DIV>On some of my other properties that have set lengths and such they are being thrown immidiately.&nbsp; I was looking at the documentation and this is the way it is suppose to happen.</DIV><DIV>&nbsp;</DIV><DIV>Is there a reason it is only verifying after a save?</DIV><DIV><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&#091;<SPAN style="COLOR: #2b91af">VerifierProvider</SPAN>&#093;<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">IEnumerable</SPAN>&lt;<SPAN style="COLOR: #2b91af">Verifier</SPAN>&gt; GetVerifiers(<SPAN style="COLOR: #2b91af">Object</SPAN> pVerifierProviderContext)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">List</SPAN>&lt;<SPAN style="COLOR: #2b91af">Verifier</SPAN>&gt; verifiers = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">List</SPAN>&lt;<SPAN style="COLOR: #2b91af">Verifier</SPAN>&gt;();<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>verifiers.Add(GetEmailAddressVerifier(Descriptors.Email));<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> verifiers;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">Verifier</SPAN> GetEmailAddressVerifier(<SPAN style="COLOR: #2b91af">PropertyDescriptor</SPAN> pEmailDescriptor)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">RegexVerifier</SPAN>(pEmailDescriptor, <SPAN style="COLOR: blue">true</SPAN>, <SPAN style="COLOR: #2b91af">NamedRegexPattern</SPAN>.Email);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<O:P></O:P></SPAN></P></DIV><span style="font-size:10px"><br /><br />Edited by orcities - 09-Oct-2007 at 1:27pm</span>]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 13:27:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=484&amp;PID=1513#1513</guid>
  </item> 
 </channel>
</rss>