-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isNumeric does not handle Scientific Notation #2463
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
Scientific Notation values such as 3.6379788070917e-12 are not considered numeric by
isNumeric
This may be best as part of the no symbols option, to allow 'e' if no_symbols is false.
Examples
If applicable, add screenshots to help explain your problem.
const value = Number('3.6379788070917e-12'); isNumeric(value.toString());
returns false, but should return true.
Reproductions
If applicable, provide a reproduction on platforms like runkit
Additional context
Validator.js version:
Node.js version:
OS platform: [windows, linux, macOS, etc]
The text was updated successfully, but these errors were encountered: