Lamina.DSL.Config.validate
You're seeing just the macro
validate
, go back to Lamina.DSL.Config module for more information.
Specs
Specify a validation function to ensure that the value is valid.
Gives you an opportunity to ensure that the value about to be returned to the user is correct.
Example
defmodule MyFileReader.Config do
use Lamina
provider(Lamina.Provider.Env)
config :file_to_read do
validate(fn
"/etc/password" -> false
_ -> true
end)
end
end