Look at the CF isDate and isNumeric functions for server side validation;

For client side, here's some javascript for date format validation:

var dateObj = new Date(<formInput>);
if (isNaN(dateObj.valueOf()))
        return false;

For numeric, use isNaN.


-----Original Message-----
From: Steven A. del Sol [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 5:04 PM
To: CF-Talk
Subject: Simple validation


I am in desperate need of a simple validation of two types of form fields.

1.   Date field (not a cfform just a plain form) - must validate that data 
entered is a date

2.  Number field (not a cfform just a plain form) - must validate that data 
entered is a number


Thanks

Stephanie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to