Choice
Requires the property’s value to be one of a fixed allowlist.
Backed by Quiote\Validator\InarrayValidator.
Synopsis
Section titled “Synopsis”final class Choice
| Since | 1.0.0 |
| Source | Request/Attribute/Constraint/Choice.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$message | ?``string | readonly. |
$values | array | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(array<int, string|int|float> $values, ?string $message = null): mixed
| Parameter | Type | Description |
|---|---|---|
$values | `array<int, string“ | int |
$message | ?``string |
Returns mixed