Ask HN: How would you validate data on both back end and front end?

https://news.ycombinator.com/item?id=9708239
by borlum • 11 years ago
4 5 11 years ago

Dear HN,

in most projects you want to do validation of the submitted data both client- and server-side.

When using node/js the validation is simple, of course, because the validation rules are written once. But, more often than not I don't work in JS or use another server side language.

My Question: Do you know of any good way to validate objects/data structures in a language agnostic way?

I have considered something like JSON-schema or some sort of code generation.

Any ideas?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com