Value to test.
Predicate to test against.
Test if value
matches the provided predicate
. Throws an ArgumentError
with the specified label
if the test fails.
Value to test.
Label which should be used in error messages.
Predicate to test against.
Create a reusable validator.
Predicate used in the validator function.
Returns true
if the value matches the predicate, otherwise returns false
.
Test if the value matches the predicate. Throws an
ArgumentError
if the test fails.