<?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 : Setting Verification Attributes on Properties</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Setting Verification Attributes on Properties</description>
  <pubDate>Thu, 21 May 2026 21:26:23 -700</pubDate>
  <lastBuildDate>Sun, 14 Feb 2010 20:57:40 -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=1412</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>Setting Verification Attributes on Properties : It is really a very good Experience...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=6199#6199</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=684" rel="nofollow">jon</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 14-Feb-2010 at 8:57pm<br /><br />It is really a very good Experience to know that how to set verification attribute on Properties. As I know An attribute is a specification that defines a property of an object,element, or file. An attribute of an object usually consists of a nameand a value; of an element, a type or class name; of a file, a name andextension. <br><br>]]>
   </description>
   <pubDate>Sun, 14 Feb 2010 20:57:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=6199#6199</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : The LearningResources get installed...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5740#5740</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 04-Nov-2009 at 11:29am<br /><br />The LearningResources get installed different places depending on what OS you're using. If you're using Windows XP they should still be under C:\Program Files\IdeaBlade DevForce.&nbsp; But wherever they get installed, you should be able to get to them via the IdeaBlade DevForce\Documentation\Learning Resources option on the Windows Start menu.<br><br>It is also possible to elect not to install them when you install the product, but I guess you'd know if you'd done that.<br>]]>
   </description>
   <pubDate>Wed, 04 Nov 2009 11:29:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5740#5740</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : You&amp;#039;re right - I&amp;#039;m a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5732#5732</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=619" rel="nofollow">Waxman</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 04-Nov-2009 at 7:05am<br /><br />You're right - I'm a couple of versions behind.&nbsp; I've gotten permission to upgrade and the metadata stuff work fine now.&nbsp; Cool!&nbsp; However, now, I don't have any code samples.&nbsp; I uninstalled my previous version (5.2.1.0) and after installing the new version (5.2.3.1), I don't even have a Learning Resources folder.&nbsp; Not sure what going on.&nbsp; Thanks for the help, though.<DIV>&nbsp;</DIV><DIV>Terry</DIV>]]>
   </description>
   <pubDate>Wed, 04 Nov 2009 07:05:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5732#5732</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : What version are you running?...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5727#5727</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 03-Nov-2009 at 11:25am<br /><br />What version are you running? The validation folder is currently named 070_Validation, and it contains a Samples folder that in turn contains folders with Winforms, WPF, and Silverlight code solutions that implement validation.<br><br>However, all of those except the Silverlight solution have been there for a pretty good while, so maybe something happened with your installation?<br><br>Version difference may explain the compile problems, too.<br>]]>
   </description>
   <pubDate>Tue, 03 Nov 2009 11:25:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5727#5727</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : Thanks for the reply- this is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5716#5716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=619" rel="nofollow">Waxman</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 30-Oct-2009 at 3:00pm<br /><br /><P>Thanks for the reply&nbsp;- this is exactly what I needed.&nbsp; However,&nbsp;your suggestion&nbsp;doesn't seem to work for me.&nbsp; It would probably help considerably if I knew what code samples you were talking about.&nbsp; When I look in my 'C:\Program Files\IdeaBlade DevForce\Learning Resources\060_Validation' directory, all I see are three files:</P><DIV>- Ch080_Validation Through Verification.pdf</DIV><DIV>- Slides_Verification.pdf</DIV><DIV>- Slides_Verification.ppt</DIV><DIV>&nbsp;</DIV><DIV>Should I be seeing something else?&nbsp; Are you talking about a different place for code samples, like the website?&nbsp; (Can't seem to find anything there either.)</DIV><DIV>&nbsp;</DIV><DIV>At any rate, there seems to be an issue with the code you wrote above.&nbsp; When I try to do what you did, I get a compiler error, because the verifier attributes can only be applied to properties and they are being applied to fields in your example.&nbsp; Should they be properties?&nbsp; If so, I tried automatic properties, and that didn't seem to work.&nbsp; Not sure what I'm doing wrong.&nbsp; Seem to be getting thwarted at every turn.</DIV><DIV>&nbsp;</DIV><DIV>Thanks for the help,</DIV><DIV>Terry</DIV><DIV>&nbsp;</DIV><DIV>P.S. Here's the code I'm using, if it helps at all:</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System.Collections.Generic;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System.Linq;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System.Text;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System.ComponentModel;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> System.ComponentModel.DataAnnotations;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> IdeaBlade.EntityModel;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> IdeaBlade.Validation;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> ProModel.Extensions;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>namespace</FONT></FONT><FONT size=2> ProModel.Eps.ObjectModel.DevForce</P><P>{</P></FONT>&#091;</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>MetadataType</FONT></FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>typeof</FONT></FONT><FONT size=2>(</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>UserAccountMetadata</FONT></FONT><FONT size=2>))&#093;</DIV></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>partial</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>UserAccount</FONT></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2></P></FONT></FONT><FONT size=2><P>{</P><DIV>...</FONT><FONT size=2></FONT></DIV><DIV><FONT size=2>}</DIV><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>static</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>UserAccountMetadata</P></FONT></FONT><FONT size=2><P>{</FONT><FONT color=#008000 size=2><FONT color=#008000 size=2></P></FONT></FONT><FONT size=2><P>&#091;</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>RequiredValueVerifier</FONT></FONT><FONT size=2>()&#093;</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>static</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2> EmailAddress { </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>get</FONT></FONT><FONT size=2>; </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>set</FONT></FONT><FONT size=2>; }</P><P>}</P><DIV></DIV>}</FONT></DIV>]]>
   </description>
   <pubDate>Fri, 30 Oct 2009 15:00:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5716#5716</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : You can add verifiers using code...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5715#5715</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 30-Oct-2009 at 1:16pm<br /><br />You can add verifiers <i>using code </i>as illustrated in the Silverlight, WPF, and WinForm code samples in the Validation section of the Learning Resources.<br><br>You can add <i>attributed </i>verifiers to generated properties in a metadata "buddy class" for your business class.&nbsp; Below, I've added the buddy class into the same file (and namespace statement block) as the developer partial class.<br><br>The developer partial class needs to be marked with the MetadataType attribute to name the buddy class that contains the additional metadata.<br><br><br><b>...<br>using IbVal = IdeaBlade.Validation;<br>using DataAnnot = System.ComponentModel.DataAnnotations;<br><br>namespace DomainModel {<br><font color="#ff0000">&nbsp; &#091;DataAnnot.MetadataType(typeof(EmployeeMetadata))&#093;</font><br>&nbsp; public partial class Employee&nbsp; {<br><br>&nbsp; ...<br><br>&nbsp; }<br><br>&nbsp; /// &lt;summary&gt;<br>&nbsp; /// The buddy class for Employee.<br>&nbsp; /// &lt;/summary&gt;<br>&nbsp; public static class EmployeeMetadata {<br><br>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;<br>&nbsp;&nbsp;&nbsp; /// Override city to make it required.<br>&nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;<br>&nbsp;&nbsp;&nbsp; &#091;IbVal.RequiredValueVerifier()&#093;<br>&nbsp;&nbsp;&nbsp; public static string City;<br><br>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;<br>&nbsp;&nbsp;&nbsp; /// Restrict the string length more than in the generated verifier<br>&nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;<br>&nbsp;&nbsp;&nbsp; &#091;IbVal.StringLengthVerifier(MaxValue = 10, IsRequired = true)&#093;<br>&nbsp;&nbsp;&nbsp; public static string FirstName;<br>&nbsp; }<br>}<br>&nbsp;</b>]]>
   </description>
   <pubDate>Fri, 30 Oct 2009 13:16:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5715#5715</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : This is exactly my experience...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5713#5713</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=619" rel="nofollow">Waxman</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 30-Oct-2009 at 4:58am<br /><br />This is exactly my experience and question as well:<DIV></DIV><DIV>&nbsp;</DIV><DIV>How do you apply (custom) property verifier attributes to your auto-generated business object properties?</DIV><DIV>For example, what's the simplest way to apply a regex verifier to a mapped string property?</DIV><DIV>What's the simplest way to apply a custom verifier to a mapped property?</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Terry</DIV>]]>
   </description>
   <pubDate>Fri, 30 Oct 2009 04:58:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5713#5713</guid>
  </item> 
  <item>
   <title>Setting Verification Attributes on Properties : Wow, there&amp;#039;s a lot in the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5112#5112</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=518" rel="nofollow">philcockfield</a><br /><strong>Subject:</strong> 1412<br /><strong>Posted:</strong> 04-Aug-2009 at 1:11pm<br /><br />Wow, there's a lot in the Verification engine.  After reading through the Developer Manual I confused on this point:<br /><br />There is lots of discussion about the Verifier attributes - and examples of these attributes on the properties in the generated class (.Designer.cs).<br /><br />But that is re-generated everytime the ObjectMapper runs.<br /><br />I can't see how to get these attributes onto the properties in a safe place.<br /><br />I'm sure I'm missing something simple here.  Any help?<br />Also, are there some concise code examples of this in action within a project?  If so where.  The learning resources just include the chapter in the Dev Manual and the PPT.<br /><br />Thanks.]]>
   </description>
   <pubDate>Tue, 04 Aug 2009 13:11:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1412&amp;PID=5112#5112</guid>
  </item> 
 </channel>
</rss>