CSCfi / metadata-submitter-frontend

Frontend for Metadata Submission Interface.
https://metadata-submitter.rtfd.io
MIT License
5 stars 2 forks source link

Investigate alternative ways for form validation #61

Open otahontas opened 4 years ago

otahontas commented 4 years ago

Proposed solution

Empty values (strings "" and objects {}) are parsed away before validating, also numbers are casted as numbers.

Parsing form data before each validation round clearly has some (not supernotable) performance drawbacks, so another solutions should be consireded at some point.

DoD (Definition of Done)

Form data isn't parsed through before sending to validator

Testing

peer to peer

blankdots commented 3 years ago

i think it is related to https://github.com/CSCfi/metadata-submitter-frontend/blob/develop/src/components/NewDraftWizard/WizardForms/WizardJSONSchemaParser.js#L31-L52 and the idea is that that might not be optimal to always clean that and a better solution should be found that would not require that clean-up.

if we can find a good solution optimising getting form data for JSON we should tackle it.