3 ms·
You could use something like json-schema to define constraints, and use json-schema validator libs on the front and back end to validate the form data against t
by ervine 2y ago
You could use something like json-schema to define constraints, and use json-schema validator libs on the front and back end to validate the form data against the schema.
You still need to handle the "what happens next" part on each side, but at least your validation rules are shared.