Field Type Demo
Demonstrating all field types with their variations

String Fields

Max 100

Min 3, Default: "Default String"

Default: "Optional Default"

Nullable, Default: "Nullable Default" (can clear with null)

Number Fields

Default: 42

Optional with default: 100 (will error if cleared with null)

Nullable with default: 200 (can clear with null)

Boolean Fields

Default: true

Optional with default: false

Nullable with default: true

Array of String Fields

Default: ["tag1", "tag2"]

Default: ["optional1"] (CAN'T clear - reverts to default)

Default: ["nullable1"] (CAN clear with null)

useWatch Demo (with useFormContext)

stringRequired: undefined

numberRequired: undefined

objectRequired.street: undefined

objectRequired.city: undefined

arrayOfObjects[0].name: "item1"

arrayOfObjects[0].value: "value1"

All fields correctly typed as T | undefined. Nested objects use PartialWithNullableObjects; array items use RHF's PathValue.

Note: Array of Objects and Object fields are also supported but require custom UI components for proper editing. The defaults are being populated correctly via getSchemaDefaults().