Validate Number in Javascript

Regex pattern to validate numbers in JavaScript: