Troy, when you were validating the form, did you by any chance use the validate="onserver" attribute (if it was a CFFORM) or the older hidden field validation where you used name="yourfield_integer" for a hidden field? If so, both of those could be changing the actual value coming into the form processing page, so that the $ is gone. Just be sure to output the value of form.fieldname before your isvalid test, to be sure it's indeed what you expect it should be.
There's a problem similar to this that happens with date fields, where the date typed in becomes an ODBC date format unexpectedly (something I blogged about many years ago: http://www.systemanage.com/cff/cftips3.cfm#_date). If that's not it, please do let us know. Just something I thought worth your double-checking. /charlie From: [email protected] [mailto:[email protected]] On Behalf Of Troy Jones Sent: Wednesday, March 04, 2009 12:45 PM To: [email protected] Subject: [ACFUG Discuss] isValid and validate="integer" Hey again all, I was working on a form that is using a <cfinput> tag with the attribute of "validate="integer"". In testing this form, I was using all types of different characters trying to get it to blow up and every single time I used the "$" character and only numbers besides, it would return true and allow submission. That seemed a little odd to me. I had always understood "validate="integer"" to mean that the data should contain only numbers. "$" is certainly not a number. So, I wanted to try another method of validation. I created a test template and used the isValid("integer", "testvaluehere") function with the same data that I had been testing with on the bugged form. Lo and behold, it also returned true with the "$" character in the data. However, when using the isNumeric() function, it returned false as expected. Has anyone else ever encountered this or does anyone have any input on this? Is this a known bug? Troy Jones Dynapp Support Team 678-528-2952 ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
