Skip to content

Commit 7f4dcfc

Browse files
committed
chore(validator): 添加numberValidator方法返回值
1 parent 3e21b21 commit 7f4dcfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const idCardValidator = (v: string): boolean => {
8484
* numberValidator('-1'); // true
8585
* numberValidator('12e2'); // true
8686
*/
87-
export const numberValidator = (v: string) => {
87+
export const numberValidator = (v: string): boolean => {
8888
const hasE = /e/i.test(v)
8989
// 科学计数法
9090
const eReg = /^[-+]?\d+(?:\.\d+)?(?:e[+-]?|E[+-]?)\d+?$/

0 commit comments

Comments
 (0)