hello ladies and gentlemen,
what do you suggest for validations?
I am checking this one: https://github.com/valiktor/valiktor/releases/tag/0.11.0 (@rodolpho.couto thanks).
There is also the hibernate validation, but it is not exactly what I am looking for...
but I would like to know what else people are using.
I will probably go with the valiktor, but I just want to check other options before choose it
04/08/2020, 9:53 AM
I have not tried valiktor before. At first glance, it looks a little strange to use. But extension functions should allow you to create an easy to use API. Hibernate allows a data class to define it's rules, but the caller decides when to validate them. I'd probably create extension methods
on all model classes, to make nested validations easier and keep the rules with the model, without enforcing them on construction already.
It seems to throw similar exceptions to Hibernate. So most integrations should work fine.
04/08/2020, 10:03 AM
I am still testing, but, actually, this valiktor works very well