Open nepahwin opened 11 years ago
Hi... the above example, obviously, is for python. For the client-side JS in the couchapp, we should look into using something from here: http://json-schema.org/implementations.html
note that the schema description is using the version 3 specification - the version 4 specification is very new and I don't know how much has changed.
I've come to think that we should only implement the schema in python upload scripts (where it will be important). The application interface is so tightly bound to the data specification that adding the schema will have very little (or no) affect on function. Submit form validation is already handled by existing infrastructure.
Hi James..
The main reason I would implement a validation in the javascript is to make the software more robust for the developers. I understand that the application interface well matches the schema, but I would want to make sure there's some way that protects the app interface developers from making a mistake in the javascript. I don't think using one of the external JS libs for validation is very difficult. And I don't think that you will be in charge of this thing forever and/or looking over everybody's shoulder. Its like a built-in unit-test to the software that prevents builders of the website from making mistakes.
$0.02, Adam
On Mon, Jul 22, 2013 at 12:08 AM, James Loach notifications@github.comwrote:
I've come to think that we should only implement the schema in python upload scripts (where it will be important). The application interface is so tightly bound to the data specification that adding the schema will have very little (or no) affect on function. Submit form validation is already handled by existing infrastructure.
— Reply to this email directly or view it on GitHubhttps://github.com/nepahwin/persephone/issues/28#issuecomment-21327806 .
Yep, we'll look to implement it. I think your comment re. the developers is a good one.
Original note from Adam: