<?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 on xxx.create method</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : validation on xxx.create method</description>
  <pubDate>Wed, 15 Apr 2026 01:53:28 -700</pubDate>
  <lastBuildDate>Wed, 05 Mar 2008 10:37:21 -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=709</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 on xxx.create method : How to handle required fields...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=709&amp;PID=2641#2641</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> 709<br /><strong>Posted:</strong> 05-Mar-2008 at 10:37am<br /><br /><P>How to handle required fields when doing a Create on an object depends on what you want your users to experience. I'm assuming you generated your business objects with Verification turned "on" and its sub-option to generate verifiers. The "Generate predefined verifiers" options means (in effect) that you want DevForce to inscribe "Required" verifiers for every non-null property it generates.</P><DIV>The verifiers are generated with <strong><EM>Preset </EM></strong>triggers, which means they lock up the UI when the user sets the value to null (more precisely, they throw an exception which causes Data Binding to lock up the UI).</DIV><DIV>&nbsp;</DIV><DIV>This is appropriate most of the time and is the safest thing to do. That is, it is safest to assume that the user should not be able to leave a required field blank once she has started entering data into it.</DIV><DIV>&nbsp;</DIV><DIV>However if you decide that it is OK&nbsp;to allow blank strings <EM>temporarily</EM>&nbsp;(you should run Verification before the save to catch errors), there are a couple options you can do:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; 1. You could turn off auto-generation of verifiers (but leave generation of BeforeSetValue and AfterSetValue) and add the verifiers you want in the business logic of the entity.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; 2.&nbsp;Alternatively, you can programmatically discover&nbsp;the generated required verifiers&nbsp;and change the triggering from Preset to <strong><EM>Postset</EM></strong>. Postset means the verifier is evaluated after the property is set (no exception is thrown and the user can move out of the control).</DIV><DIV>&nbsp;</DIV><DIV>Hope this helps.</DIV>]]>
   </description>
   <pubDate>Wed, 05 Mar 2008 10:37:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=709&amp;PID=2641#2641</guid>
  </item> 
  <item>
   <title>validation on xxx.create method :  What&amp;#039;s the best practice...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=709&amp;PID=2628#2628</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=90" rel="nofollow">DataMan</a><br /><strong>Subject:</strong> 709<br /><strong>Posted:</strong> 29-Feb-2008 at 4:09pm<br /><br /><DIV></DIV><DIV></DIV>What's the best practice for handling required fields when doing a <FONT size=2>Create on an object.<DIV></DIV><DIV></DIV><DIV></DIV>When I try entering in a new line it automatically shows the errorprovider saying that the value is invalid.<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV><BR>The example that you have in the tutorial makes it easy because the two required fields in the order summary table CustomerID and EmployeeID are not required fields in the table.&nbsp; My SQL table has 2 key fields that are required.</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;<BR><BR></DIV></FONT>]]>
   </description>
   <pubDate>Fri, 29 Feb 2008 16:09:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=709&amp;PID=2628#2628</guid>
  </item> 
 </channel>
</rss>