This is the format the database wants it in or it bombs. Must have four
digit year. 

Now that I know I can validate using CFFORM, which works, I now how to
figure out how to create a custom error (using CFERROR, never done it)
for the users so they know what to do.

 


"Maia, Eric" wrote:
> 
> Why do you care that they're entering that specific format, as long as
> they're entering a valid date you can convert to that format?
> 
> -----Original Message-----
> From: James Taavon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 6:39 AM
> To: CF-Talk
> Subject: Re: Date Validation
> 
> oh, i dont want to change the date format, i want to validate against
> the "mm/dd/yyyy" format.
> 
> "Sicular, Alexander" wrote:
> >
> > that doesn't do much for you because you are checking date against itself
> in
> > a different format.
> >
> > this will check to make sure that the data passed is a valid date.
> >
> > <cfif isdate(form.due_date)>
> > ....
> > </cfif>
> >
> > then you can change it's format via dateformat()
> >
> > good luck,
> >
> > -alex
> >
> > -----Original Message-----
> > From: James Taavon [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 08, 2001 9:39 AM
> > To: CF-Talk
> > Subject: Date Validation
> >
> > I want to do check to see if users are entering the date properly in my
> > form. Is this correct?
> >
> > <cfif #form.due_date# IS NOT #DateFormat(form.due_date, "mm/dd/yyyy")#>
> >         <XCRIPT LANGUAGE="XavaXcript" TYPE="text/XavaXcript">
> >     <!--                alert ('Your Date entry is
> invalid.')location.href='XavaXcript:window.history.back(1)'    //-->
> >     </XCRIPT>
> > <cfabort>
> > </cfif>
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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