# MultiValueInterface

> Defines the contract for form controls that accept one or many values.

[API reference](/docs/api/index.md) › [HTML Contracts](/docs/extensions/html-contracts/reference/index.md) › [Form](/docs/extensions/html-contracts/reference/form/index.md) › MultiValueInterface

| interface | `UIAwesome\Html\Contracts\Form\MultiValueInterface` |
| --- | --- |
| Source | [`src/Form/MultiValueInterface.php`](https://github.com/ui-awesome/html-contracts/blob/main/src/Form/MultiValueInterface.php#L16) |

Implemented by 1 type:

- [`UIAwesome\Html\Form\Select`](/docs/extensions/html/reference/form/select/index.md)

Defines the contract for form controls that accept one or many values.

Applies to controls such as multiple-selection lists and choice lists, where the value is either a scalar or a set
of selected values.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`value()`](#method-value) abstract | Sets the `value` attribute. | `MultiValueInterface` |

## Method details

### value() <span id="method-value"></span>

```php
abstract public function value(mixed[]|bool|float|int|string|Stringable|UnitEnum|null $value): static
```

Sets the `value` attribute.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `mixed[]\|bool\|float\|int\|string\|`[`Stringable`](https://www.php.net/manual/en/class.stringable.php)`\|`[`UnitEnum`](https://www.php.net/manual/en/class.unitenum.php)`\|null` | Single value or set of selected values, or `null` to remove the attribute. |

**Returns**

`static`: New instance with the updated `value` attribute.