For now, I have implemented a server side workaround to fix the issue using REreplace(). It just seemed inconsistent to me that "integer" would not validate only "integral" data.
Charlie, I did verify the form.fieldname output by observing what was inserted to the database that it uses. It did indeed have the "$" character in the data. What I was looking into and wasn't able to come to a good enough conclusion to determine anything was the /inetpub/wwwroot/cfide cfform.js. It appeared that the _cf_checkinteger() function was actually stripping the "$" character before providing a return value. I also found that confusing. Isn't the point of determining a data type to see if it is actually that data type and not strip it and manipulate it first? Maybe this is where I am missing the boat, if indeed I am missing the boat. Anyways, like I said, I have moved on with my own workaround for now. I was really just picking brains for experience on the matter. Troy Jones Dynapp Support Team 678-528-2952 From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart Sent: Wednesday, March 04, 2009 1:57 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] isValid and validate="integer" 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: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Troy Jones Sent: Wednesday, March 04, 2009 12:45 PM To: discussion@acfug.org 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 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 -------------------------------------------------------------