[#1442] Allow only decimal number in send command

This commit is contained in:
Roman Volosovskyi 2019-05-04 21:24:55 +03:00
parent 6b99225e06
commit aaaa625e9a
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 1 deletions

View File

@ -161,7 +161,9 @@
(or (js/isNaN amount)
(> (count portions) 2)
(re-matches #".+(\.|,)$" amount-string))
(re-matches #".+(\.|,)$" amount-string)
;; check if non-decimal number
(re-matches #"0[\dbxo][\d\.]*" amount-string))
{:title (i18n/label :t/send-request-amount)
:description (i18n/label :t/send-request-amount-invalid-number)}