On 9/20/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> The problem is that 'string' is way too lenient, because you want to
> allow dates, the empty string and that's it.  A type of 'string' will
> also allow "hulabaloo" to be passed without error, which is
> undesirable.  

So make an error. Throw an exception if the string isn't empty and
can't be converted to a date.

Another option is to roll your own date object and pass an instance of
it into the function instead.

> Of course, you HAVE to use type="string" in order to
> circumvent CF's weird type system, but by doing so, you're basically
> removing the utility of having the typing system at all (and may as
> well just leave the attribute off).  Not that I recommend that

I'm on the verge of recommending it.

Patrick

-- 
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to