def currency_clean_helper(currency, value):
	"""Used to validate that a currency value works for a 
	give currency.  Should be called from a forms clean() method.

	Returns (value, errors)
	"""
	whole = value[0]
	frac = str(value[1]) if len(value) == 2 else None
	if frac and len(frac) > currency.decimal_places:
		return None, "Too many decimal places (%s) for currency %s" % (
				len(frac), currency)

	if not frac:
		frac = '0' * currency.decimal_places
	elif len(frac) < currency.decimal_places:
		frac += '0' * (currency.decimal_places - len(frac))

	return int(str(whole) + frac), None