depending on how you're handling the data, isDate can give you some 
funkiness. There are a lot of values which are considered "valid date 
objects" which don't fit your actual needs for a date. I'd go with Bob's 
suggestion of a regex.
eg.
#isdate("403")# -- NO
#isdate("4/03")# -- YES
#isdate("4-03")# -- YES
#isdate("4.03")# -- YES
#isdate("1030")# -- NO

Dawson, Michael wrote:

>How about isDate()? 
>
>-----Original Message-----
>From: Bob Clingan [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, July 06, 2005 11:12 AM
>To: CF-Talk
>Subject: Validation of Date on Form
>
>You will to write regular expressions to check for those types of dates
>you want to allow. Don't forget about sanity checks like 31st in a month
>with 30 days and leap year.
>
>  
>
>>I've got a number of forms in an administration area that will accept a
>>    
>>
>
>  
>
>>date in any number of formats
>>
>>mm/dd/yyyy
>>mm/dd/yy
>>July 4, 2005
>>
>>...and so on...
>>
>>I need a way to validate this field so if somebody types something 
>>other than an accepted date (like "Bob") they get an alert saying 
>>"Please format your date like XXXXX".
>>
>>Looks pretty easy with CF 7, but their host ain't running CF 7.
>>
>>Suggestions?
>>
>>
>>--
>>-----------
>>Les Mizzell
>>    
>>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211299
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to