exvalibur v0.10.0 Exvalibur.Validatable behaviour View Source

The behaviour all validators are to implement.

When the validator is module-based (injected with use Exvalibur,) the default implementation comes out of the box.

Has custom_validate/1 overridable callback to implement in the modules for custom validation.

Link to this section Summary

Callbacks

Callback to be implemented in the modules using Exvalibur

Link to this section Callbacks

Link to this callback

custom_validate(data) View Source
custom_validate(data :: term()) :: {:ok, term()} | :error

Callback to be implemented in the modules using Exvalibur.

Called as a last resort: rules take precedence.