---
title: "Field Group"
canonical_url: "https://nnsvn.me/products/nuxt-starter-kit/components/docs/field-group"
---

> Index of every page on this site: [llms.txt](https://nnsvn.me/llms.txt)

## Usage

<ct-stack>
<div className="p-4">
<ct-field-group>
<ct-field name="withDefault" type="boolean" default-value="true">

A field with a default value.

</ct-field>

<ct-field name="requiredField" type="boolean" :required="true">

A required field.

</ct-field>

<ct-field name="clear (path?: string)" type="void">

Clears form errors associated with a specific path. If no path is provided, clears all form errors.

</ct-field>

<ct-field name="getErrors (path?: string)" type="FormError[]">

Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.

</ct-field>

<ct-field name="setErrors (errors: FormError[], path?: string)" type="void">

Sets form errors for a given path. If no path is provided, overrides all errors.

</ct-field>

<ct-field name="errors" type="Ref<FormError[]>">

A reference to the array containing validation errors. Use this to access or manipulate the error information.

</ct-field>
</ct-field-group>
</div>

```mdc
::ct-field-group
  ::ct-field{name="withDefault" type="boolean" defaultValue="true"}
  A field with a default value.
  ::
  ::ct-field{name="requiredField" type="boolean" required}
  A required field.
  ::
  ::ct-field{name="clear (path?: string)" type="void"}
  Clears form errors associated with a specific path. If no path is provided, clears all form errors.
  ::
  ::ct-field{name="getErrors (path?: string)" type="FormError[]"}
  Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.
  ::
  ::ct-field{name="setErrors (errors: FormError[], path?: string)" type="void"}
  Sets form errors for a given path. If no path is provided, overrides all errors.
  ::
  ::ct-field{name="errors" type="Ref<FormError[]>"}
  A reference to the array containing validation errors. Use this to access or manipulate the error information.
  ::
::
```

</ct-stack>

## Sitemap

See the full [sitemap](https://nnsvn.me/sitemap.md) for all pages.
