Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 2ef32ea

Browse files
author
Nikolai Berestevich
committed
nikolai.berestevich/fix/ point should not be counted for digitals number
1 parent 3c0fa09 commit 2ef32ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pages/trader-tools/common/_validation.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ const validation_regex = {
99

1010
const validation_is_exceed_number = (input, maxDigit) => {
1111
const max_digit = maxDigit || 15
12-
if (input.length > max_digit + 1 && input.includes(".")) {
12+
if (input.includes(".") && input.length > max_digit + 1) {
1313
return false
1414
}
15-
if (input.length > max_digit && !input.includes(".")) {
15+
if (!input.includes(".") && input.length > max_digit) {
1616
return false
1717
}
18-
1918
return true
2019
}
2120

0 commit comments

Comments
 (0)