Trying to find a library that can validate input in a specific format, such as:
{ points: array of { x: positive and less than 20, y: positive and less than 15 } }
Ideally, it should work on both server and client sides and either return a boolean or throw an exception.
What I'm specifically looking for is not string or form validation, but rather a way to quickly determine if the JSON data sent by a client is safe for processing without having to do multiple checks manually.