Commit d98d8628 authored by Johannes Knödtel's avatar Johannes Knödtel 🎶
Browse files

handle negative numbers in decimal-ok? validator correctly

parent ed15d573
......@@ -12,8 +12,8 @@
(and (instance? BigDecimal decimal)
(let [string (str decimal)
[int frac] (str/split string #"\.")
int-digits (if (< 0 decimal)
(+ 1 (.length int))
int-digits (if (< decimal 0)
(- (.length int) 1)
(.length int))
frac-digits (if frac
(.length frac)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment