Home > @polyspec/crudui-generator-core > decodeFormRenderOptions
decodeFormRenderOptions() function
Decode render options, such as the options that a server wrote into a page with JSON.stringify and a client read back with JSON.parse, into the FormRenderOptions of renderForm and the framework Form components. It is the check that every renderer runs on its options before it places the errors on the nodes of the form.
Signature:
export declare function decodeFormRenderOptions(value: unknown): FormRenderOptions;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
value |
unknown |
The parsed options. |
Returns:
The members of the value as render options; a node error keeps its other members, such as those of a validation result error.
Exceptions
FormRenderOptionsError for the first option outside the contract, in the documented order, with the JSON Pointer of that member.