integer-str passes any numeric
Đang mở
- Ngôn ngữ chính
- Clojure
- Star
- 116
- Fork
- 15
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
```clojure
(def integer-str
{:message "must be a long"
:optional true
:validate #(or (number? %) (and (string? %) (str/numeric? %)))
:coerce #(if (number? %) (int %) (str/parse-int %))})
```
`:validate` only checks if it's numeric.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.