The result of a validation. This effectively contains the list of errors, qualified by their location path
to make function signatures easier to read
A result containing no errors
A result containing no errors
A result containing a single error
Like sprintf
or failwithf
but produces a t
instead of a string or exception
fail_fn err
returns a function that always returns fail, with err
as the error
message. (Note that there is no pass_fn
so as to discourage people from ignoring
the type of the value being passed unconditionally irrespective of type.)
Check for unconditionally passing a bool
Check for unconditionally passing a unit
Returns a list of formatted error strings, which include both the error message and the path to the error.
If the result contains any errors, then raises an exception with a formatted error message containing a message for every error.
Creates a function for use in a Fields.Direct.fold
.
Create a validation function from a function that produces a bool