tracker issue : CF-3679387

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

isValid() - numeric/float behavior difference

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Scott Brady / Scott Brady (Scott Brady)

Created: 12/04/2013

Components: Documentation

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Mac 10.7 64-bit

Vote Count: 0

Problem Description:
The documentation for isValid() implies that "float" and "numeric" types are interchangeable (by being listed together).  However, they yield different results when dealing with "formatted" numbers (e.g., "1,000.00")

Steps to Reproduce:
Output the following:
#isValid("numeric","1,000.00")#
#isValid("float","1,000.00")#

Actual Result:
isValid("numeric","1,000.00") returns false
isValid("float","1,000.00") returns true


Expected Result: 
The two isValid() calls should return the same result, either true or false (probably false, because "1,000.00" is not treated like a number in other instances, such as isNumeric())


Any Workarounds:
Always use "numeric" for the isValid() type, assuming you want "1,000.00" to be considered non-numeric.

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

Watson Bug ID:	3679387

Deployment Phase:	Release Candidate

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

Mac OS X (10.9)

2009 MacBook Pro

ColdFusion 10 Developer Edition

Attachments:

Comments:

For what it's worth, Railo and OpenBD report false in both cases.
Comment by External U.
13886 | December 04, 2013 09:04:48 AM GMT
Marking bug as to fix (Comment added from ex-user id:vnigam)
Comment by Adobe D.
13887 | December 12, 2013 07:50:53 AM GMT
Please see the updated doc: https://learn.adobe.com/wiki/display/coldfusionen/IsValid
Comment by Frank J.
13888 | February 03, 2014 12:05:22 AM GMT
Issue is fixed (Comment added from ex-user id:prk)
Comment by Adobe D.
13889 | December 15, 2014 04:04:55 AM GMT