~/talk

Easy and Efficient Data Validation with Cats

Talkat Scala Days Copenhagen 2017 · 2017-05-30..06-02· [developer-experience]
slides:none on file

Compares Option and Either failure modes and shows Cats’ ValidatedNel as the practical solution for form validation by accumulating errors instead of failing fast; implements email/phone validators, combines them with the mapN/pizza symbol (apply) so all field errors return together, and uses a Semigroup (list/not-empty-list) to merge errors and force at least one message. Provides companion helpers (validateSuccess/Failure, accumulate) and working code on GitHub used successfully on multi-field forms.

AI-written summary · about

  1. 0:00Start
  2. 2:20DATA VALIDATION
  3. 6:22CASE STUDY
  4. 7:23OPTION
  5. 10:50EITHER (2.11)
  6. 15:21EITHER (2.12)
  7. 21:10VALIDATED AND APPLY
  8. 28:27USE AN EXPRESSIVE ERROR TYPE
  9. 28:53OUR FINAL SOLUTION
  10. 31:02STEP 1
  11. 32:27A CONCRETE EXAMPLE
  12. 34:27SUMMARY
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.