Magik.Validator.validate_format

You're seeing just the function validate_format, go back to Magik.Validator module for more information.
Link to this function

validate_format(value, check)

View Source

Specs

validate_format(String.t(), Regex.t()) :: :ok | error()

Checks whether a string match the given regex.

iex(11)> Magik.Validator.validate_format("year: 2001", ~r/year: {4}/)
:ok
iex(12)> Magik.Validator.validate_format("hello", ~r/+/)
{:error, "does not match format"}