Atex.Lexicon.Validators (atex v0.7.1)

View Source

Summary

Types

blob()

@type blob() ::
  %{
    "$type": String.t(),
    ref: %{"$link": String.t()},
    mimeType: String.t(),
    size: integer()
  }
  | %{cid: String.t(), mimeType: String.t()}

blob_option()

@type blob_option() :: {:accept, [String.t()]} | {:max_size, pos_integer()}

bytes()

@type bytes() :: %{"$bytes": binary()}

cid_link()

@type cid_link() :: %{"$link": String.t()}

Functions

array(inner_type, options \\ [])

blob(options \\ [])

@spec blob([blob_option()]) :: Peri.schema_def()

boolean_validate(success?, error_message, context \\ [])

@spec boolean_validate(boolean(), String.t(), keyword() | map()) ::
  Peri.validation_result()

bytes(options \\ [])

cid_link()

integer(options \\ [])

lazy_ref(module, schema_name)

@spec lazy_ref(module(), atom()) :: Peri.schema()

string(options \\ [])