# [Usage](../../../usage.md) > [Components and standard attributes](../basics.md) > required

---
`required` | `->setRequired()`

Set if the component is required, only useful in `Form` components.

| Types     | Default |
|-----------|---------|
| `boolean` | `false` |

Marks a Form field as mandatory; validated on submit and visually flagged. Only meaningful inside `Form` / `Modal` with form — ignored on pure Visuals. When omitted (`false`) the field is optional.
Combine with `validate` rules for format checks beyond presence.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('email')->setRequired(true) !!}
```
Controller:
```php
Input::make('email')->setRequired(true)->setValidate(['email']);
```

### Interaction / tips
- Pair with `validate` (../shared_attributes/validate.md): `required` for presence, `validate` for format.
- Explain the rule with `hint` (../shared_attributes/hint.md).
- Toggle dynamically via `updateOnChange` (../shared_attributes/update_on_change.md).

See also: [validate](validate.md), [hint](hint.md), [disabled](disabled.md), [placeholder](placeholder.md), [basics](../basics.md), [Form](../forms/form.md).