Talos v1.4.0 Talos.Types.FixedType View Source
Fixed type is used to check value to be equal expected
For example:
iex> the_4th_planet = %Talos.Types.FixedType{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
Link to this section Functions
Callback implementation for Talos.Types.errors/2
.
Link to this function
valid?(type, value)
View Sourcevalid?(Talos.Types.FixedType.t(), any()) :: boolean()
Callback implementation for Talos.Types.valid?/2
.