2

We are using Cornice for server-side REST API. Frontend is using React. We'd like to have frontend forms to post to Cornice and give proper validation results.

  • Are there any standard practices of form submission / error result format

  • Are there any standard practices for rendering forms in React so that Cornice validation results would be correctly dropped over the fields (like what Deform et. al. do on the server side.)

Any pointers welcome.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • I never used React with Cornice, but I've used Backbone and Angular. In both cases, I used Colander schemas to do the validation, and created a JS function to parse the error result into something usable by the JS framework. – Antoine Leclair May 17 '16 at 20:26

1 Answers1

1

There is a project called Kinto that is doing all of that.

Do not hesitate to join #kinto on freenode

Natim
  • 17,274
  • 23
  • 92
  • 150
  • About React.JS forms you can have a look at: https://github.com/Kinto/kinto-admin and https://github.com/mozilla-services/react-jsonschema-form/ – Natim May 18 '16 at 11:27