code: function(val)
      {
        var numberOptions =
        {
          style: "currency",
          currency: currency,
          minimumFractionDigits: 0,
          maximumFractionDigits: 0
        }
  
        return formatNumber(val == null || val === "" || isNaN(val) ? 0 : val, numberOptions)
      }
docs: model -> view: formats the value when updating the input element.