Dragonite.Parser.is_valid

You're seeing just the function is_valid, go back to Dragonite.Parser module for more information.
Link to this function

is_valid(struct, check \\ true)

View Source

Specs

is_valid(
  %DragoniteEDI.Message{iea: term(), isa: term(), sts: term()},
  true | false
) ::
  {:ok, %DragoniteEDI.Message{iea: term(), isa: term(), sts: term()}}
  | {:error, atom()}

Verifies if a DragoniteEDI.Message{} is valid, checking if all sub-structs are non empty and then mark message as valid. Return error at sub-struct incompleted.

A custom check can be passed to skip the validation in order to use in some pipelines.

Example

iex(1)> Dragonite.Parser.is_valid(%DragoniteEDI.Message{})