We can’t trust the data that reaches our servers. We have to make sure that it’s properly formatted, within range, that it references entities that exist in the database, or that the data matches dynamically defined business rules. A wide range of responsibility!

That’s why we need data parsers & validators. Frameworks and libraries try to help us with that task by defining various extension points where we can plug in our validation rules. But where to draw the line: when to perform what kind of validations? How much parsing & validation should be done outside the service layer (e.g…

Adam Warski

Scala software engineer, Functional Programming enthusiast, SoftwareMill co-founder

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store