# Form Controls
SvSeeds provides form controls as **Field components** such as `TextField`. All Field components share a unified structure and validation functionality.
## Basic Structure
All Field components are composed of the following structured parts:
```text
whole (div) - Overall wrapper
├─ top - Wrapper for label elements
│ ├─ label - Label text
│ ├─ extra - Label supplement (e.g., "optional")
│ └─ aux - Additional information (e.g., character counter)
├─ middle - Input element wrapper
│ └─ main - Input element (Only CheckField has a different structure)
└─ bottom - Field description and error messages
```
Because `extra` is rendered inside the `label` element, it appears only when `label` is set; provide `label` whenever you use `extra`.
### Design Rationale
We use a `div` element for the `whole` container. We avoid using `fieldset` elements because they render an [anonymous fieldset content box](https://html.spec.whatwg.org/multipage/rendering.html#anonymous-fieldset-content-box), which complicates styling.
## Validation Features
Field components provide built-in validation functionality.
### Validation Function Type Definitions
TypeScript type definitions are provided for each Field component. Please refer to the individual component documentation for details.
### Validation Patterns
Field components support three validation patterns:
#### 1. Using Custom Functions
Validation runs immediately after user input. No validation occurs when the field value(s) is empty.
```svelte