
LIVR: Language Independent Validation Rules - based2
https://livr-spec.org/
======
melbourne_mat
In case you missed it, this is not a programming language parser/validator:
it's to validate data objects in an information system. Validating a form
submission would be a good example. It looks to be along similar lines to JSON
schema.

From the LIVR docs:

"Rules should be able to change results output"

My opinion is that if you're going to use a declarative validation engine like
this then it should not be able to modify the data entity being validated.

~~~
sedatk
I think that applies to normalizations (trimming, case changes etc). It makes
sense to have those declarative and universal too.

------
correct_horse
All the examples are for validating JSON, and the documentation repeatedly
mentions JSON, but I can't tell if this project is usable with non-JSON
serialization formats. It never explicitly mentions that it is JSON-only.

~~~
sradman
It looks like it is more about declarative data structure validation in
various language runtimes. Some of the implementations [1] (the interpreted
languages like Perl, PHP, Python, and Ruby) seem to use the language's natural
literal notation instead of JSON (or JavaScript Object Literals).

It seems to be missing the "step" constraint from HTML5 Form Validations and
nullability constraints from SQL (though there is overlap with 'required').

[1] [https://livr-spec.org/introduction/implementations.html](https://livr-
spec.org/introduction/implementations.html)

------
CraigJPerry
Rather than having independent language implementations of LIVR which can
diverge, stop being maintained etc. etc.

What about having a common description of the supported behaviours then
compile these to each supported language? Like AWS generates its language
bindings

API descriptions: [https://github.com/aws/aws-sdk-
js/tree/master/apis](https://github.com/aws/aws-sdk-js/tree/master/apis)

[https://awsfeed.com/whats-new/open-source/generate-python-
ja...](https://awsfeed.com/whats-new/open-source/generate-python-java-and-net-
software-libraries-from-a-typescript-source)

~~~
dangoor
Isn't this essentially an implementation detail?

For example, there could be a tool that takes LIVR spec as input and generates
nicely typed Go could that returns properly validated input?

------
ethbro
Out of curiosity, are there any other major libs in this space?

(It's not something I've spent a lot of time looking at)

~~~
gioazzi
[https://cuelang.org/](https://cuelang.org/) Not entirely the same, but some
use cases overlap.

