View Source Shapex.Types.Atom (shapex v0.3.0)

This module provides a type for validating atoms.

It's better to use the Shapex.Types.atom/1 function to create a schema, since it covers implementation details and provides a more user-friendly API.

Summary

Types

@type atom_or_tuple() :: atom() | {atom(), String.t()}
@type t() :: %Shapex.Types.Atom{validations: [validation()]}
@type validation() :: {:eq, atom_or_tuple()} | {:neq, atom_or_tuple()}

Functions

Callback implementation for Shapex.Type.validate/2.