From fb63d159e3daa363e1c226c8bfae87b3d5f1147c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 18 Aug 2026 23:04:35 +0000 Subject: [PATCH] docs(plugin-form): fix pattern.value Type column to RegExp-only content/docs/plugins/plugin-form.mdx line 108's `validation` rule table typed `pattern.value` as `string | RegExp` in the Type column, while the Notes cell in the same row already stated the RegExp-only rule correctly. `string` was removed from `FieldValidationRules.pattern` by #5099 and the zod face (`FieldConstraintsSchema.pattern.value`) was aligned by #5186 / PR5230. Fix the one cell to `{ value: RegExp; message: string }`; Notes cell needs no change. Fixes #5249 --- content/docs/plugins/plugin-form.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/plugins/plugin-form.mdx b/content/docs/plugins/plugin-form.mdx index d9d1f08a7..1307bb99c 100644 --- a/content/docs/plugins/plugin-form.mdx +++ b/content/docs/plugins/plugin-form.mdx @@ -105,7 +105,7 @@ is **not** an array of `{ type, value, message }` entries: | `required` | `string \| boolean` | supplies the required **message** only. Whether the field is required is decided by `required` / `requiredWhen` **on the field** | | `minLength` / `maxLength` | `{ value: number; message: string }` | text length | | `min` / `max` | `{ value: number; message: string }` | numeric range | -| `pattern` | `{ value: string \| RegExp; message: string }` | hand-authored schemas must pass a **RegExp**: react-hook-form applies a pattern only when its value is `instanceof RegExp`. It is the object-metadata path (`buildValidationRules` in `@object-ui/fields`) that compiles a declared string into one, so a `pattern` string written straight into a plain `form` schema never runs | +| `pattern` | `{ value: RegExp; message: string }` | hand-authored schemas must pass a **RegExp**: react-hook-form applies a pattern only when its value is `instanceof RegExp`. It is the object-metadata path (`buildValidationRules` in `@object-ui/fields`) that compiles a declared string into one, so a `pattern` string written straight into a plain `form` schema never runs | | `validate` | `(value) => boolean \| string \| Promise` | custom check; TypeScript-authored schemas only | There is no `email` rule name — an email check is a `pattern`, which is exactly