Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.
v2 (legacy)isNumber

isNumber

The isNumber function checks if the given value is a number.

Works in: HTML5, React JS, Node.js

ParameterTypeDefaultDescription
numberstring | numberundefinedThe value to check.

Usage

Example: Check if Value is a Number

const value = 123; const isValidNumber = nfsfu234FormValidation.isNumber(value); console.log(isValidNumber); // true

Example: Check if Value is a Number

const value = "123"; const isValidNumber = nfsfu234FormValidation.isNumber(value); console.log(isValidNumber); // true

See also

Last updated on