19 declare(strict_types=1);
48 if (!array_is_list($this->valid_members)) {
51 $this->error = sprintf(
52 'The value MUST be one of: %s.',
53 join(
', ',
array_map(json_encode(...), $this->valid_members))
59 return in_array($value, $this->valid_members,
true);
A constraint encodes some resrtictions on values.
trait DeriveTransformWithProblem
This trait is a convenience trait which uses DeriveApplyToFromTransform, DeriveInvokeFromTransform an...