Download & Extend

Add amount validators per currency

Project:Currency Exchange
Version:7.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Add a validate callback to Currency objects that checks whether an amount is valid for a currency, e.g. has the right amount of decimals, or, in case of the Malagasy ariary, for instance, which is not divided into 100, but 5 subunits, has decimals that represent a valid fraction of the currency.

Comments

#1

Perhaps we should change this into a method for rounding amounts based on their currency.