We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e21b21 commit 7f4dcfcCopy full SHA for 7f4dcfc
src/validator.ts
@@ -84,7 +84,7 @@ export const idCardValidator = (v: string): boolean => {
84
* numberValidator('-1'); // true
85
* numberValidator('12e2'); // true
86
*/
87
-export const numberValidator = (v: string) => {
+export const numberValidator = (v: string): boolean => {
88
const hasE = /e/i.test(v)
89
// 科学计数法
90
const eReg = /^[-+]?\d+(?:\.\d+)?(?:e[+-]?|E[+-]?)\d+?$/
0 commit comments