tracker issue : CF-4197167

select a category, or use search below
(searches all categories and all time range)

Cfinput validate integer funcationlity change from Update 2 to 3

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Daniel Heighton / Daniel Heighton (Daniel Heighton)

Created: 10/31/2016

Components: CFForm

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: CF2016_Update3 / 302292

Priority/Frequency: Trivial / Few users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Listed in the version 2016.0.04.302561 Issues Fixed doc
Problem Description:
If a comma is in the value of a cfinput with validate="integer", it will not submit. This may be intended, but it is undocumented, and different behavior from CF2016 and Update 2 (And to the best of my knowledge, CF9, CF10, and CF11. The page we experienced this on has been written this way since CF9.
Steps to Reproduce:
Load page with this code:
<cfform name="testform" action="##">
	<cfinput name="intvalidate" validate="integer" value="100,000"></cfinput>
	<cfinput name="submit" type="submit" value="submit" />
In browser, hit submit button. See it fail. Remove comma, submit, see it work.
Actual Result:
You get a javascript warning there is an error in intvalidate text
Expected Result:
The page should submit.
Any Workarounds:
Remove the comma before submitting the form, remove validate attribute, or change validate to numeric.
The issue with changing it to numeric, is then people can type in decimal places. Which mans I have to make an assumption the backend.
The issue with removing the validate, is that I can't return a problem to the user until after they submit the form to the server, increasing delays on entering information.

Our experience is that many people type in commas even when they don't need to, either for their own benefit so they can more easily read the number, or because they are copying or pasting, or any other reason. I don't feel like it makes sense for integer validation to fail when a number has commas in it.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4197167

External Customer Info:
External Company:  
External Customer Name: Daniel Heighton
External Customer Email:  
External Test Config: My Hardware and Environment details:

CF2016 Update 3

Windows Server 2008 R2 64-bit

Tested in both firefox, and google chrome.