Scrutinex.Checks.Number (Scrutinex v0.2.0)

Copy Markdown View Source

Numeric comparison checks (greater_than, less_than, equal_to, etc.).

Summary

Functions

Validates value against each comparison in opts.

Functions

run(value, opts)

@spec run(
  number(),
  keyword()
) :: :ok | {:error, String.t(), map()}

Validates value against each comparison in opts.

Supported keys: :greater_than, :greater_than_or_equal_to, :less_than, :less_than_or_equal_to, :equal_to, :not_equal_to.