Define nested object field with shape defined by innerDecoders param.
Accepts any objects containing all specified properties which are valid in respect to rules imposed by their respective decoders.
Does not accept empty objects and objects with reserved 'root' property
Type Parameters
O extends object
Parameters
innerDecoders: { [K in string | number | symbol]: FieldDecoder<O[K]> }
Returns ObjectFieldDecoderWithGuards<O>
Example
constSchema = newFormSchemaBuilder() .fields({ x:FormFields.object({ foo:FormFields.string(), bar:FormFields.number() }) // x: { foo: string; bar: number | "" } }) .build()
Define nested object field with shape defined by
innerDecoders
param. Accepts any objects containing all specified properties which are valid in respect to rules imposed by their respective decoders.Does not accept empty objects and objects with reserved 'root' property