Kaixhin / FGLab

Future Gadget Laboratory
https://kaixhin.github.io/FGLab/
MIT License
223 stars 34 forks source link

Merge client-side and server-side form validation #8

Open Kaixhin opened 9 years ago

Kaixhin commented 9 years ago

The new experiment and optimisation pages currently use submit and on-change validation respectively. In addition there is validation code server-side (which is necessary for an API). To abide by the DRY principle, perhaps the server-side code can be sent as a function to the client-side, and both forms can utilise on-change validation.