-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add scientific notation support to isNumeric validator
- Updated the isNumeric function to handle scientific notation values. - Modified the regular expression to account for both positive and negative exponents using 'e' or 'E'. - Introduced an option to handle locales with different decimal separators. - Preserved backward compatibility by ensuring the no_symbols option continues to function correctly. - This change validates inputs like 1e5, 1.23E-5, and other variations of scientific notation.
- Loading branch information
1 parent
ff56dcf
commit 205834d
Showing
1 changed file
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters