Greetings! Business validations are a crucial part of any application. We faced use cases with too many validations. It is hard to maintain and extend the solutions with such a number of validations. This is when I thought to try a solution even though there was no such task in the backlog. Hence I used my own personal time for this. Features Execute a larger number of validations in single use case Reusability by sharing the same validation in different use cases Skip non-mandatory validations by user choice (yes/no dialogs) Expose validations via REST API Extendability by adding/removing validations No performance impact Easy to use in future developments It all started with an Interface My quick solution was to introduce a common interface by utilizing Java generics and Java 8 new features. I did not have all the features in mind when introducing this. However, that is the power of having a proper interface. public interface Validator<T> { void vali...
May all beings be happy, be well, be peaceful, and be free