cco3 · GitHub

@cco3

@cco3

Because there is not an exported value, getting the form errors by injection:
- is currently brittle (could change on a future release without causing errors) and
- does not benefit from implicit typing.
Before:
```
import type { FormError } from "@nuxt/ui";
const formErrors = inject<FormError[]>('form-errors');
```
After:
```
const formErrors = inject(formErrorsInjectionKey);
```

@cco3

@cco3 cco3 changed the title Export a formErrorsInjectionKey feat(useFormField): Export a formErrorsInjectionKey

Aug 23, 2025

@benjamincanac

@benjamincanac benjamincanac changed the title feat(useFormField): Export a formErrorsInjectionKey feat(useFormField): export form errors injection key

Aug 25, 2025

@benjamincanac

Read the original on github.com ↗