CF 7 BugHunt
Add and View Bug Comments at the bottom of the Element.
Number validation in cfform fails for octal number
Philadelphia Pennsylvania CFUG
cfinput, anything using the numeric range compare
Generates an Error
Description of bug:
Line 466 in cfform.js is part of the checkrange validation for numbers. (Used in dates and other areas) It uses eval, which can cause problems when checking a number like 07 or 06, eval uses octal to evaluate the number. When checking a number like 08 or 09, this causes a problem since it is not a valid octal number. This causes a JS error in Firefox. Try validating the date 08/21/2006. If you have firebug or a js debugger installed, you should get a message like: 08 is not a legal ECMA-262 octal constant The fix is to cast to a number explicitly. Original: return (_CF_numberrange((eval(object_value)), min_value, max_value)); Fixed: return (_CF_numberrange((Number(object_value)), min_value, max_value)); Reported to MM/Adobe 2/28
A D D Y O U R C O M M E N T S T O T H I S B U G
Please login to add comments to a bug
C O M M E N T S
Comment display is being revamped. We apologize for the delay.
[Joe Gooch] [Monday, Jun 11, 2007 05:48 PM]
Fixed in Scorpio public beta
Sponsored by TeraTech - © 2003-2017