﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » Required Field Checks</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 14 Sep 2026 12:10:40 GMT</lastBuildDate><ttl>20</ttl><item><title>Required Field Checks</title><link>http://forum.strataframe.net/FindPost2029.aspx</link><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;According to the help docs:&lt;/FONT&gt;&lt;/P&gt;&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;A name=RequiredFieldValidation&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 9pt"&gt;&lt;EM&gt;&lt;FONT color=#000000&gt;&lt;FONT face=Arial&gt;Required Field Validation&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;The required fields will be automatically checked during the &lt;I&gt;CheckRulesOnCurrentRow&lt;/I&gt; event for each unique row in the business object. &amp;nbsp;StrataFrame supports the following data types when checking for a required field: &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Character -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for character data, the string length must be greater than zero.&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Numeric -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for numeric data, the value must be greater than zero.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Boolean -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for Boolean data, the value must be True (or 1).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;DateTime -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for dates, the date must be greater than or equal to 01/01/1800.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;The documentation does not match the code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The code performs the following checks:&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Character –&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; For &lt;SPAN style="mso-no-proof: yes"&gt;SqlDbType.Text&lt;/SPAN&gt;, the string length must be greater than zero.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;SqlDbType.Char and SqlDbType.Varchar are not evaluated here.&lt;/SPAN&gt;&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Numeric –&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; For &lt;SPAN style="mso-no-proof: yes"&gt;SqlDbType.BigInt, SqlDbType.Int, SqlDbType.SmallInt, SqlDbType.TinyInt&lt;/SPAN&gt;, the value must be greater than zero.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Other non-integer numeric types are not evaluated here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Boolean -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for Boolean data, the value must be True (or 1).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;DateTime -&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; When validating the rules for dates, the date must be greater than or equal to 01/01/1800.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=bullet-diamond-blue-simple style="MARGIN: 6.8pt 0in 6.8pt 0.5in"&gt;&lt;FONT color=#000000&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;All Other Datatypes –&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt; The validation checks for NULL values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;Recommend BusinessLayer.&lt;SPAN style="mso-no-proof: yes"&gt;CheckRequiredFields() method be modified to perform null checks on all datatypes and also check for 0-length strings for all database string datatypes (char, varchar, and text).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Drop the specific processing for Boolean, Numeric, and DateTime.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A Boolean value of FALSE should not be used to indicate an “empty” field.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The existing Boolean required field check implies the TRUE would be the only acceptable value, and this does not make sense.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Custom field validations should be used to handle all non-null Numeric and DataTime field checks.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Since zero (0) and negative numbers are valid numeric values, “&amp;gt; 0” should not be used for a required fields check representing “empty”.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The DataTime required field check is similar.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If a particular implementation uses a specific datatime value (such as 01/01/1800) as a null/invalid field value, that check should be implemented as a custom validation check.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Tue, 01 Aug 2006 08:50:01 GMT</pubDate><dc:creator>Joe Paquette</dc:creator></item><item><title>RE: Required Field Checks</title><link>http://forum.strataframe.net/FindPost2033.aspx</link><description>When the required fields are added through the type editor, the required field checked the .NET data type of the field, and since all character fields are System.String, the required field is added with an SqlDbType of Text.&amp;nbsp; So, that's why none of the other character types are added, because they will not show up in the required fields through the type editor.&amp;nbsp; As for the integer types (bigint, tinyint, smallint, etc.) the type editor will create all of them with a data type of SqlDbType.Int.&amp;nbsp; &lt;/P&gt;&lt;P&gt;So, the only change that really needs to be made is to test the separate values for DBNull.Value before the other tests.&amp;nbsp; Any of the other logic can simply be handled by not choosing the field as a required field (just leave it unchecked) and implementing custom logic for the field.</description><pubDate>Tue, 01 Aug 2006 08:50:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>