Use javascript to validate amounts