diff --git a/docs/content/docs/2.components/form-field.md b/docs/content/docs/2.components/form-field.md index da1a402f00..60f046d491 100644 --- a/docs/content/docs/2.components/form-field.md +++ b/docs/content/docs/2.components/form-field.md @@ -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: | + + +--- + +: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.