MyApp.Cldr.validate_number_system_type

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

validate_number_system_type(number_system_type)

View Source

Specs

validate_number_system_type(String.t() | atom()) ::
  {:ok, atom()} | {:error, {module(), String.t()}}

Normalise and validate a number system type.

Arguments

Returns

  • {:ok, normalized_number_system_type} or

  • {:error, {exception, message}}

Examples

iex> MyApp.Cldr.validate_number_system_type :default
{:ok, :default}

iex> MyApp.Cldr.validate_number_system_type :traditional
{:ok, :traditional}

iex> MyApp.Cldr.validate_number_system_type :latn
{
  :error,
  {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
}

iex> MyApp.Cldr.validate_number_system_type "bork"
{
  :error,
  {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
}