Normalize defaultValue properly (#21511)

<img width="1506" height="338" alt="image"
src="https://github.com/user-attachments/assets/3ee0d5c9-af32-4ef3-83c9-2f4671219126"
/>
This commit is contained in:
martmull
2026-06-12 23:10:51 +02:00
committed by GitHub
parent 926cf2d0cf
commit e293c33311
6 changed files with 205 additions and 0 deletions
@@ -18,6 +18,15 @@ export type RegularFieldManifest<
label: string;
description?: string;
icon?: string;
/**
* Default value in the canonical metadata format.
*
* Literal string defaults must be wrapped in single quotes inside the
* string (e.g. `"'Draft'"`), including string sub-fields of composite
* defaults (e.g. `{ source: "'MANUAL'" }`) and SELECT/MULTI_SELECT values.
* Unquoted strings are reserved for computed defaults such as `'uuid'`
* and `'now'`; any other unquoted string raises a validation warning.
*/
defaultValue?: FieldMetadataDefaultValue<T>;
options?: FieldMetadataOptions<T>;
universalSettings?: FieldMetadataUniversalSettings<T>;