jQuery.isNumeric(value) (alias $.isNumeric) returns true when value represents a finite JavaScript number (added in jQuery 1.7). As of jQuery 3.0, that means type number or a string that coerces to a finite number.
Syntax
Start with these common calls. Keep them short and readable.
Learn jQuery.isNumeric(): test finite numbers and numeric strings, reject NaN Infinity and CSS units, official true/false samples, examples, pitfalls, and FAQs.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Start with a value (number, form string, option, etc.).
Step 2
Call $.isNumeric(value) — true means finite numeric.
Step 3
If true, convert with Number(value) or parseFloat as needed.
Return Value
Return Value
Description
Boolean
Often true or false depending on the match or state.
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
Partial strings."-0x42" and "7.2acdgs" are not clean numeric strings.
Empty / object."" and {} are not numbers.
Special numbers.NaN and Infinity fail the finite check.
Example 3 — Validate a Quantity Input
Confirm the field is numeric before accepting a value.
jQuery
function checkQty(raw) {
if (!$.isNumeric(raw)) return "Enter a valid number";
var n = parseFloat(raw);
if (n < 1) return "Minimum quantity is 1";
return "OK: " + n;
}
console.log(checkQty("5")); // "OK: 5"
console.log(checkQty("abc")); // "Enter a valid number"
console.log(checkQty("0")); // "Minimum quantity is 1"
Gate.$.isNumeric(raw) rejects junk like "abc" first.
Parse. On success, parseFloat turns the string into a number.
Range. Business rule: quantity must be at least 1.
Frequently Asked Questions
jQuery.isNumeric(value) returns true when value is a finite number, or a string that can be coerced into a finite number (such as "10", "-3.5", or "8e5"). It returns false for empty strings, booleans, objects, NaN, Infinity, null, undefined, and partial strings like "10px".
Yes. It was deprecated in jQuery 3.3 and removed in jQuery 4.0. It still works in jQuery 3.x for legacy code. Prefer Number.isFinite() for real numbers, or a small helper when you must accept numeric strings from form inputs.
Yes — as of jQuery 3.0 it accepts type number or type string when the string coerces to a finite number. "42", "-10", "3.1415", "0xFF", and "8e5" all return true. "10px" and "7.2acdgs" return false.
isNaN coerces values and can surprise you — isNaN("") is false because "" becomes 0. $.isNumeric("") is false. Use $.isNumeric (or Number.isFinite) when you want a stricter finite-number check.
Only finite numeric values pass. Infinity and NaN have typeof "number" in JavaScript, but they are not useful as ordinary numeric input — jQuery excludes them on purpose.
For actual numbers, use Number.isFinite(value). For form strings, trim first, then check with Number.isFinite(Number(str)) or parseFloat plus a finite check — and still validate ranges for your app.