View Source CEM.SearchValidators (cem v0.1.1)

Validation for CEM.search/2 options.

These functions are here so that custom validations can be added as public functions.

Summary

Functions

Returns {:ok, x} if low <= x <= high, and {:error, message} otherwise.

Functions

Link to this function

validate_range(x, low, high)

View Source
@spec validate_range(any(), number(), number()) :: {:ok, any()} | {:error, String.t()}

Returns {:ok, x} if low <= x <= high, and {:error, message} otherwise.