Hi Mike,
You could start with a bit of Javascript validation on the client side. This
will catch the majority of submitted invalid dates before they're sent to
the server, giving your user an immediate response and avoiding your server
having to process an invalid date.
http://www.javascript-2.com/date-validation.html
Also perform a server side check to catch those who either have JS
turned-off or those with malicious intentions in mind attempting to force an
error. You can use the ColdFusion function isDate() to check if the date is
valid, eg. isDate("29/02/2003")
hth,
- Ben
http://www.daemon.com.au/
-----Original Message-----
Is there a simple way to check they have entered a
valid date rather than a laborious checking for leap year, if the month is
april and date greater than 30 etc etc etc?
I get errors if they choose 31 September or 30 February etc as you'd expect
but I'd rather handle the error gracefully than just display a nasty
database error.
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004