Hi,
I am forced to use the old style validation for some basic form elements, and I am having problems with a date input box, I figured that it automatically stores the value as a String so the "AND isDate(form.Effective_Date)" should return a true or false, what it does instead return a blank space that ends up passing my initial validation .
I guess me question is, I am grabbing a value from a form (YYYYMMDD) which I need converted to number and/or then checked for valid, present and non space value.
<p><label for="Effective_Date">Effective Date of the assignment (yyyymmdd):</label><br />
<input type="text" class="date" maxlength="8" value="" id="Effective_Date" name="Effective_Date" tabindex="1400" /></p>
<cfif ISDEFINED("form.Effective_Date")>
<cfset Effective_Date = Trim(form.Effective_Date)>
<cfelse>
<cfset Effective_Date = "">
</cfif>
<cfif NOT ISDEFINED("form.Effective_Date") OR form.Effective_Date EQ "">
<cfset errors = errors & "<li class=""errors"">Effective Date</li>">
</cfif>