money amount validation funktion mit erklärendem kommentar versehen
This commit is contained in:
parent
6758bb5a44
commit
fee14d9349
1 changed files with 1 additions and 0 deletions
|
@ -24,6 +24,7 @@ def iso_date(field, value, error):
|
||||||
|
|
||||||
def valid_money_amount(field, value, error):
|
def valid_money_amount(field, value, error):
|
||||||
try:
|
try:
|
||||||
|
# value is string, check formatting by parsing as float
|
||||||
float(value)
|
float(value)
|
||||||
return True
|
return True
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
|
|
Loading…
Reference in a new issue