hello ladies and gentlemen, what do you suggest fo...
# ktor
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.
­čĹŹ 1
I will probably go with the valiktor, but I just want to check other options before choose it
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.
I am still testing, but, actually, this valiktor works very well