Validation is an important part of most applications. This blog post compares validation strategies for object-oriented and functional code. The code in this repository is based on the code from this blog article.
The code in the idiomatic
package shows how to do validation by hand using if
statements.
The code in the jsr303
package shows how to do validation using the features of JSR 303 (bean validation) and JSR 380.
The code in the functional
package shows how to do validation with functional programming using the Arrow library.