Generate self-validated objects, and handle validation states and failures in a declarative, compile-safe way.
A Modddel is validated upon creation, so you'll never deal with non-validated data.
A Modddel is a sealed class which union cases are the different validation states it can be, so you can be sure that all possible states are handled.
Modddels are composed in a way that allows you to address every possible validation failure precisely.
You have full control over the validation logic, which you can split into multiple steps.
Handle validation states and failures in a declarative way, and make your code easier to read and maintain.
Easily unit-test your Modddels and the validation logic.
Enjoy using modddels? Show your support with a coffee or membership subscription. Your help means the world!
Copyright © 2022 Omar Jennane.
Sourcing vector created by vectorjuice - www.freepik.com