Validation is a very common task in software engineering. We need to validate stuff all the time: user inputs, data formats, array bounds, external configurations, etc. In this article I will show you how to perform validation in a type-safe way, eliminating a whole class of bugs.