Input Validation in PureScript: Simpler, Safer, and Stronger (Part 1)
summary
Claims that PureScript plus its Validation library and row polymorphism makes input validation predictable and composable, and demonstrates concrete code: primitive validators (min/max length, contains upper/lower), V validation type with non-empty error lists, Applicative-based accumulation that concatenates errors via Semigroup, newtype-wrapped Email/Password fields, record row-based form validation that builds a validated record, and a pragmatic conversion to Either for fail-fast sequencing; workshop runs in two hours and produces validators that accumulate all failures unless explicitly converted.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:12Input Validation in PureScript
- 4:14Validations on Primitive Types
- 13:34Combining Primitive Validations
- 31:19Validations on Forms
related talks
21mBeyond Type Checking Building Bulletproof TypseScript Applications
35mGADTs and You; Writing Safer Code Using GADTs
25mMaking Impossible States Impossible
42mLet the Compiler Help You: How to Make the Most of Scala's Type System
07mTyped Functional Programming in TypeScript with fp-ts
28mPimp Your Parameters: The Magic of Validation Classes
38mSafer TypeScript
44mFinite state machines
