Closed mjzuppe closed 1 year ago
entry.inputs need to be validated against their corresponding template.inputs For example, if you have:
entry.inputs
template.inputs
template.inputs[0] = {type: "text", label: "title"}
entry.inputs[0] = {label: "title", value: "Hello World"}
entry.create()
entry.template
entry.inputs
need to be validated against their correspondingtemplate.inputs
For example, if you have:template.inputs[0] = {type: "text", label: "title"}
entry.inputs[0] = {label: "title", value: "Hello World"}
Then we need to ensure during theentry.create()
validation that those inputs match the template. You'll likely want to query the template viaentry.template
parameter with https://github.com/juicebox-technologies/urchin-sdk/blob/2b6f31920b29779b9531ec8bd8aafb35718a538f/src/core/actions/template.ts#L36 so you can iterate through the data.