Cldr.Currency.validate_new_currency

You're seeing just the function validate_new_currency, go back to Cldr.Currency module for more information.
Link to this function

validate_new_currency(code)

View Source

Specs

validate_new_currency(code()) ::
  {:ok, code()} | {:error, {module(), String.t()}}

Determines is a new currency is already defined.

Example

iex> Cldr.Currency.validate_new_currency :XAC
{:ok, :XAC}

iex> Cldr.Currency.validate_new_currency :USD
{:error, {Cldr.CurrencyAlreadyDefined, "Currency :USD is already defined."}}