Input Validation in PureScript: Simpler, Safer, and Stronger (Part 2)
summary
Shows how PureScript validation switches from non-empty lists to a free semi-ring accumulator so branching alternatives accumulate errors correctly, uses Alt and a semiring V to let a field be either email or username, and wires regex-based email checks (unsafe for demo) and pursuit-sourced libraries into composable validators. Code compiles and runs, producing detailed failure records and valid sum-type UserID values, and points to polyform for production and a live demo that compiles and runs.
AI-written summary · about
chapters (6)
- 0:00Start
- 4:12Email Validation Library
- 18:41Username Validation
- 26:29Validate Username
- 31:49Summary Further Reading
- 33:42Main Takeaway
related talks
07mTyped Functional Programming in TypeScript with fp-ts
52mType-Driven Development with F#
25mMaking Impossible States Impossible
25mLeveraging (algebraic data) types to make your UI rock solid
49mDomain Modeling Made Functional
42mLet the Compiler Help You: How to Make the Most of Scala's Type System
38mSafer TypeScript
21mBeyond Type Checking Building Bulletproof TypseScript Applications
