Form Validations with VEST
summary
Vest is a framework-agnostic validation library that treats validations like unit tests: you write suites with test/enforce, plug them into a React form in about five lines, and get: only validate a specific field via vest.only, async validations with res.done that show a pending spinner while promises resolve, draft results to avoid unnecessary server calls, and test.memo caching to reuse previous async outcomes. Live coding shows regex warnings via vest.warn, class name helpers for success/error states, and that everything works end-to-end.
AI-written summary Β· about
chapters (10)
- 0:00VEST introduction
- 2:55Traditional validation problems
- 4:16VEST setup in React
- 7:10Display errors and styling
- 9:17Multiple field rules
- 12:11Validate on change
- 13:36Weak password warnings
- 15:24Async validations with server
- 18:39Optimize async validations
- 21:28Summary and benefits
related talks
30mForm Validations Do Not Have To Suck. Introducing Vest!
22mBuilding a next-gen validations framework
28mGetting extremely productive with Angular forms
15mRethinking JS form validations. Say hi to Passable
29mStreamlined Form Management in React with Formik
54mTaming Forms in React
31mVueConf US 2021 | Component testing with Vite, Vue, and Cypress
27mAnatomy of a Test Runner: What Vitest Keeps Getting Right
