abhay-raizada / nostr-forms

A forms application, built on top of nostr
https://formstr.app
MIT License
50 stars 14 forks source link

added form spec json schema and fixed some type errors #69

Closed rramaa closed 1 year ago

rramaa commented 1 year ago

To validate against a json schema, we can use the following code snippet:

const form = await getForm()
const schema = import(`./form-schemas/{form.schemaVersion}/form-spec.json`)
const isValid = validate(form, schema)

Need to discuss about the interfaces. Can discuss later not urgent

netlify[bot] commented 1 year ago

Deploy Preview for hilarious-cupcake-5ce684 ready!

Name Link
Latest commit 54e83581bc9a7f7ca7515acb71880a0be8a558ca
Latest deploy log https://app.netlify.com/sites/hilarious-cupcake-5ce684/deploys/6555f8ccd907d50008c40eaf
Deploy Preview https://deploy-preview-69--hilarious-cupcake-5ce684.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

abhay-raizada commented 1 year ago

we can make this a part of the getFormTemplate being worked on here: https://github.com/abhay-raizada/nostr-forms/pull/66/files can be done in another PR, we should document these TODO's