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

This module provides a type for validating enums.

Enums are a list of possible values that a value can be.

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

Summary

Types

@type t() :: %Shapex.Types.Enum{items: [Shapex.Type.t()]}

Functions

Callback implementation for Shapex.Type.validate/2.