Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/content/docs/2.components/form-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,31 @@ slots:
This sets the `color` to `error` on the form control. You can change it globally in your `app.config.ts`.
::

### Error Pattern

Nested state values will not show up by default as validation-failed messages below the form control. This is particularly relevant for components such as UInputTags and USelect. Providing a regular expression via this prop will allow those form errors to be detected and displayed. The regular expression will be matched against the `name` key's value within the `errors` list of the `FormErrorEvent`.

::component-code
---
prettier: true
ignore:
- label
- class
- name
props:
label: List of IDs
errorPattern: /^ids\..*/
name: ids
class: 'w-full'
slots:
default: |

<UInputTags class="w-full" />
---

:u-input-tags{class="w-full"}
::

### Size

Use the `size` prop to change the size of the FormField, the `size` is proxied to the form control.
Expand Down
Loading