NimbleOptions.validate

You're seeing just the function validate, go back to NimbleOptions module for more information.
Link to this function

validate(options, schema)

View Source

Specs

validate(
  keyword(),
  schema()
) ::
  {:ok, validated_options :: keyword()}
  | {:error, NimbleOptions.ValidationError.t()}

Validate the given options with the given schema.

See the module documentation for what a schema is.

If the validation is successful, this function returns {:ok, validated_options} where validated_options is a keyword list. If the validation fails, this function returns {:error, validation_error} where validation_error is a NimbleOptions.ValidationError struct explaining what's wrong with the options. You can use raise/1 with that struct or Exception.message/1 to turn it into a string.