<cfinput type="text" name="eventdate" label="Date of this event (ex.
8/20/2006)" message="Please provide a valid date" validateat="onserver,
onsubmit" validate="date" required="yes"  value="#DateFormat(
getconsignevent.eventdate, "m/dd/yyyy")#">

Does Coldfusion know where your validation script is?

<cfform scriptsrc="location.to.cfform.js">

              <CFINPUT name="Date" maxlength="10" type="text"
style="width:75px" value="" size="8" required="yes" validate="date"
message="You must enter a start date for this job as: MM/DD/YYYY">


On 6/17/06, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> I'm using x-forms so I can't use a cfcalendar on this.
>
> I'm using a regular text input for the user to enter the date. The problem
> is, I'm entering junk data and a lot of it's slipping thru.
>
> Here's the form:
>
> <cfinput type="text" name="eventdate" label="Date of this event (ex.
> 8/20/2006)" message="Please provide a valid date" validateat="onserver,
> onsubmit" validate="date" required="yes"  value="#DateFormat(
> getconsignevent.eventdate, "m/dd/yyyy")#">
>
> Then I'm runnin another check:
>
> <cfif NOT IsValid("date", FORM.eventdate)>
> blah blah blah
> </cfif>
>
> If I enter 6757665765, SQL server shoots me the rod!
>
> [Macromedia][SQLServer JDBC Driver]The year, 18503760, is outside the
> range allowed by the SQL Server.
>
> How can I make sure this is a valid date? Nothing seems to stop my junk
> data.
>
> Thanks,
> Will
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243920
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