RaiEx v0.3.1 RaiEx.Tools.Validator View Source
Provides functionality for run-time validation of rpc types.
Link to this section Summary
Functions
Validates the type types used by RaiEx.RPC. Raises ArgumentError
if the types fail to validate
Link to this section Functions
Validates the type types used by RaiEx.RPC. Raises ArgumentError
if the types fail to validate.
Examples
iex> validate_types(["account" => :string, "count" => :integer], ["account" => "xrb_34bmpi65zr967cdzy4uy4twu7mqs9nrm53r1penffmuex6ruqy8nxp7ms1h1, "count" => 5])
:ok
iex> validate_types(["account" => :string, "count" => :integer], ["account" => "xrb_34bmpi65zr967cdzy4uy4twu7mqs9nrm53r1penffmuex6ruqy8nxp7ms1h1, "count" => "10"])
** (Elixir.ArgumentError)