Talos.Types.FixedType (Talos v1.12.3) View Source
Fixed type is used to check value to be equal expected
For example:
iex> import Talos, only: [fixed: 1]
iex> the_4th_planet = fixed(value: "Mars")
iex> Talos.valid?(the_4th_planet, "Earth")
false
iex> Talos.valid?(the_4th_planet, "Mars")
true
Additional parameters:
allow_nil
- allows value to be nil
Link to this section Summary
Functions
Callback implementation for Talos.Types.errors/2
.
Callback implementation for Talos.Types.valid?/2
.
Link to this section Types
Specs
Link to this section Functions
Callback implementation for Talos.Types.errors/2
.
Specs
Callback implementation for Talos.Types.valid?/2
.