Introducing Lotus::Validations
Data validation is an important piece in software architecture. It guarantees that the successive layers will operate on correct input. In the existing Ruby frameworks we’re used to see this responsibility flatten down into models. The problem with this approach is that we end to mix a lot of validations for different use cases in a single place. When the application grows in complexity, we add new validations. If often happens that some rules are incompatible with others, then we introduce nasty conditionals to trigger only a subset of them. »