RE: Simple validation
The first one would work (_required), but as far as I know there is now embedded form validation for email addresses. Does anyone else have different info on that? Douglas Malcolm > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 12:38 AM > To: CF-Talk > Subject: RE: Simple validation > > > > May i use it for validation of ...E mail Address. > like > > > > > > > > > doug@mediate. > > com (Douglas To: CF-Talk > <[EMAIL PROTECTED]> > Malcolm) cc: > > Subject: RE: Simple > validation > 04/04/01 > > 03:38 AM > > Please > > respond to > > cf-talk > > > > > > > > > > Steven, > > This may help. I pasted it from a presentation I wrote to give to some > staff programmers recently, so please excuse the semi-formal language. > > > Form validation via cold fusion > > CF includes an easy way to validate your forms, called "Cold Fusion > embedded > form validation". The syntax is passed to the cf server via a > normal-looking scheme. > > Suppose you have a field called Lastname. It is in your form thus: > > > To make this field required, add the following hidden field: > > > > This tells the cf engine that the field Lastname is required, and > if a form > is submitted without that field, the error message "Enter your last name." > shows on the screen. > > There are many validation checks at your disposal. The list includes: > _date : Checks for a date in the most common formats > _float : Numeric data, decimal point allowed > _integer : Numeric data, no decimal point allowed > _range : Range of values, as in "min=5 max=10" > _required : Field may not be left blank > _time : Time in most common formats > > There is no limit to the number of validation rules you can embed in a > form. > Every rule must be embedded as a separate Hidden field, however. So to > flag > a field as both numeric and required, for example, you'd need 2 hidden > fields. > > > Hope that helps, > > Douglas Malcolm > > > > > -Original Message- > From: Steven A. del Sol [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 03, 2001 3: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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Simple validation
May i use it for validation of ...E mail Address. like doug@mediate. com (Douglas To: CF-Talk <[EMAIL PROTECTED]> Malcolm) cc: Subject: RE: Simple validation 04/04/01 03:38 AM Please respond to cf-talk Steven, This may help. I pasted it from a presentation I wrote to give to some staff programmers recently, so please excuse the semi-formal language. Form validation via cold fusion CF includes an easy way to validate your forms, called "Cold Fusion embedded form validation". The syntax is passed to the cf server via a normal-looking scheme. Suppose you have a field called Lastname. It is in your form thus: To make this field required, add the following hidden field: This tells the cf engine that the field Lastname is required, and if a form is submitted without that field, the error message "Enter your last name." shows on the screen. There are many validation checks at your disposal. The list includes: _date : Checks for a date in the most common formats _float : Numeric data, decimal point allowed _integer : Numeric data, no decimal point allowed _range : Range of values, as in "min=5 max=10" _required : Field may not be left blank _time : Time in most common formats There is no limit to the number of validation rules you can embed in a form. Every rule must be embedded as a separate Hidden field, however. So to flag a field as both numeric and required, for example, you'd need 2 hidden fields. Hope that helps, Douglas Malcolm -Original Message- From: Steven A. del Sol [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 3: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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Simple validation
isDate(). isNumeric(). chris olive, cio cresco technologies [EMAIL PROTECTED] http://www.crescotech.com -Original Message- From: Steven A. del Sol [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 6: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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Simple validation
Steven, This may help. I pasted it from a presentation I wrote to give to some staff programmers recently, so please excuse the semi-formal language. Form validation via cold fusion CF includes an easy way to validate your forms, called Cold Fusion embedded form validation. The syntax is passed to the cf server via a normal-looking scheme. Suppose you have a field called Lastname. It is in your form thus: To make this field required, add the following hidden field: This tells the cf engine that the field Lastname is required, and if a form is submitted without that field, the error message Enter your last name. shows on the screen. There are many validation checks at your disposal. The list includes: _date : Checks for a date in the most common formats _float : Numeric data, decimal point allowed _integer : Numeric data, no decimal point allowed _range : Range of values, as in min=5 max=10 _required : Field may not be left blank _time : Time in most common formats There is no limit to the number of validation rules you can embed in a form. Every rule must be embedded as a separate Hidden field, however. So to flag a field as both numeric and required, for example, youd need 2 hidden fields. Hope that helps, Douglas Malcolm -Original Message- From: Steven A. del Sol [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 3: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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Simple validation
In reverse-order: 2. Number field (not a cfform just a plain form) - must validate that data entered is a number --> Use JavaScript to handle this on form submission. Or use CF: IsNumeric() to handle it post-submission. 1. Date field (not a cfform just a plain form) - must validate that data entered is a date --> This comes up time and time again. I use this code for my clients; you're welcome to use it. It's a simple form that uses drop-downs to force proper formatting. Of course you may want to use IsDate() to make sure you don't allow 2/30 for example. Here's the code: #MonthAsString(month)# #day# #year# ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Simple validation
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(); 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists