<?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 : Why aren&#039;t [Required] fields verified?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Why aren&#039;t [Required] fields verified?</description>
  <pubDate>Tue, 28 Apr 2026 18:02:51 -700</pubDate>
  <lastBuildDate>Tue, 11 Aug 2009 07:13:56 -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=1405</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>Why aren&#039;t [Required] fields verified? : I switched from .Net to IdeaBlade...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5145#5145</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1405<br /><strong>Posted:</strong> 11-Aug-2009 at 7:13am<br /><br />I switched from .Net to IdeaBlade validation and the RequiredValueVerifier is now there and working.  Thank you.  That fixed it.  My Test now passes:<br /><table width="99%"><tr><td><pre class="BBcode">&#091;TestMethod&#093;<br />&#091;ExpectedException(typeof(IdeaBlade.Validation.VerifierResultException))&#093;<br />public void AddABogusDealNoLastUpdated()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deal deal = Deal.GetASimpleBuyDeal();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deal.LastUpdateUser = "";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//next line should throw error without LastUpdateUser<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IdeaBlade.EntityModel.SaveResult result = deal.EntityAspect.EntityManager.SaveChanges();<br />}</pre></td></tr></table>]]>
   </description>
   <pubDate>Tue, 11 Aug 2009 07:13:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5145#5145</guid>
  </item> 
  <item>
   <title>Why aren&#039;t [Required] fields verified? : Are you using .NET or DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5139#5139</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> 1405<br /><strong>Posted:</strong> 10-Aug-2009 at 10:23am<br /><br />Are you using .NET or DevForce validation? Are you decorating the property with a &#091;Required&#093; attribute (.NET's) or &#091;RequiredValueVerifier()&#093; (DevForce's)?]]>
   </description>
   <pubDate>Mon, 10 Aug 2009 10:23:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5139#5139</guid>
  </item> 
  <item>
   <title>Why aren&#039;t [Required] fields verified? : Yes.  I do.  Here is the code:  public...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5138#5138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1405<br /><strong>Posted:</strong> 10-Aug-2009 at 10:03am<br /><br />Yes.  I do.  Here is the code:<br /><table width="99%"><tr><td><pre class="BBcode">public static Deal Create(User user)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (Deal)Create&lt;Deal&gt;(user);<br />}<br /><br />protected static BaseEntity Create&lt;T&gt;(User user) where T : BaseEntity<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitManager();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T item = _manager.CreateEntity&lt;T&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetATemporaryKey(item);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item.InitializeDefaults(user);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddToManager(item);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return item;<br />}<br /><br />protected override void InitializeDefaults(User user)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.EnteredBy = user.UserId;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.DateEntered = DateTime.Now;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.DateOfDeal = DateTime.Today;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.DealNumber = null;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.Promoted = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.SoftDeleted = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.DealTermsChanged = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.Delivered = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.FlowDateStart = DateTime.Today.AddDays(1);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.FlowDateEnd = DateTime.Today.AddWeekdays(1);<br />}</pre></td></tr></table>]]>
   </description>
   <pubDate>Mon, 10 Aug 2009 10:03:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5138#5138</guid>
  </item> 
  <item>
   <title>Why aren&#039;t [Required] fields verified? : What does your Create method look...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5116#5116</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> 1405<br /><strong>Posted:</strong> 05-Aug-2009 at 2:16pm<br /><br />What does your Create method look like? Are you initializing any fields in there to null?]]>
   </description>
   <pubDate>Wed, 05 Aug 2009 14:16:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5116#5116</guid>
  </item> 
  <item>
   <title>Why aren&#039;t [Required] fields verified? : Does anyone have any ideas on...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5100#5100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1405<br /><strong>Posted:</strong> 03-Aug-2009 at 8:19am<br /><br />Does anyone have any ideas on this?]]>
   </description>
   <pubDate>Mon, 03 Aug 2009 08:19:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5100#5100</guid>
  </item> 
  <item>
   <title>Why aren&#039;t [Required] fields verified? : When I run this test:   public...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5085#5085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1405<br /><strong>Posted:</strong> 31-Jul-2009 at 7:26am<br /><br />When I run this test:<br /><table width="99%"><tr><td><pre class="BBcode">&#091;TestMethod&#093;<br />public void AddABogusDealNoLastUpdated()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;Deal deal = Deal.Create(); <br />&nbsp;&nbsp;&nbsp;&nbsp;deal.LastUpdateUser = "";<br />&nbsp;&nbsp;&nbsp;&nbsp;//next line should throw verifier error without LastUpdateUser<br />&nbsp;&nbsp;&nbsp;&nbsp;IdeaBlade.EntityModel.SaveResult result = deal.EntityAspect.EntityManager.SaveChanges();<br />}</pre></td></tr></table><br />The &#091;Required&#093; attribute on the LastUpdateUser property doesn't seem to be doing much.  <br />My savehandler does this:<br /><table width="99%"><tr><td><pre class="BBcode">public void DomainModelEntityManager_Saving(object sender, IdeaBlade.EntityModel.EntitySavingEventArgs e)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;VerifierResultCollection allResults = new VerifierResultCollection();<br />&nbsp;&nbsp;&nbsp;&nbsp;foreach (Entity item in e.Entities)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var itemResults = ((BaseEntity)item).VerifyInstance();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (var result in itemResults) { allResults.Add(result); }<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!allResults.AreOk)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.Cancel = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VerifierResults = allResults;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}</pre></td></tr></table><br />I have a verifier that checks something else and it causes the save to be canceled.  I had assumed that the &#091;Required&#093; field being empty would be a problem, but instead I get an Oracle error: <br /> IdeaBlade.EntityModel.EntityManagerSaveException: ORA-01400: cannot insert NULL into ("GCSD9"."DEAL"."LAST_UPDATE_USER")<br />ORA-06512: at line 4 ---&gt;  Devart.Data.Oracle.OracleException: ORA-01400: cannot insert NULL into ("GCSD9"."DEAL"."LAST_UPDATE_USER")<br />ORA-06512: at line 4.<br /><br />Is there a way to verify that the &#091;Required&#093; fields are populated?]]>
   </description>
   <pubDate>Fri, 31 Jul 2009 07:26:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1405&amp;PID=5085#5085</guid>
  </item> 
 </channel>
</rss>