25 public function check($value);
33 public function accepts($value);
restrict(Result $result)
Restricts a Result.
A constraint encodes some resrtictions on values.
problemWith($value)
Tells what the problem with the provided value is.
A result encapsulates a value or an error and simplifies the handling of those.
check($value)
Checks the provided value.
accepts($value)
Tells if the provided value complies.
withProblemBuilder(callable $builder)
Get a constraint like this one with a builder for a custom error message.