Easy and Efficient Data Validation with Cats
summary
Compares Option and Either (Scala 2.11/2.12) to Cats’ Validated and shows using ValidatedNel to run validations in parallel and return every failure instead of failing fast; demonstrates concrete functions validateEmail/validatePhone, builds a Validation type alias and an Error case class, wires a companion object with an accumulate errors helper, maps error lists to HTTP status codes, and shows runnable example code that composes, returns structured errors, and works as intended.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:23DATA VALIDATION
- 5:34FOR-COMPREHENSION
- 6:25CASE STUDY
- 7:28OPTION
- 18:36EITHER (2.12)
- 19:56BIASED EITHER WITH 2.11
- 22:29VALIDATED AND APPLY
- 26:24USE AN EXPRESSIVE ERROR TYPE
- 27:16OUR FINAL SOLUTION
- 28:55STEP 3
- 30:37A CONCRETE EXAMPLE
- 32:31SUMMARY
related talks
39mFunctional Error Handling with Cats
46mOptimusPrimeT
31mCool toolz in the Scalaz and Cats toolboxes
36mKittens - datatype-generic functional programming with Scala
28mTAMING YOUR HERD OF CATS
15mEvaluation in Cats: the Good, the Bad, and the Lazy
16mGetting started with EitherT
38mThinking Less with Scala
