I am using the Money gem with a Rails app. I am rendering the input for the amount using humanized_money
. If I enter a wrong format for the amount in the input, besides getting a validation error, the input amount changes to a valid one.
My question is, how can I reset this amount to 0
if there is a validation error on the amount input?