Evyatar Alush

Form Validation. The Tested Way

What if your form validation logic was as clear and testable as your unit tests? Discover a declarative, framework-agnostic library that makes it possible.

Form Validation. The Tested Way
#1about 5 minutes

Why user experience with forms is often broken

A personal story about a frustrating tax form highlights common UX failures like unclear requirements and delayed feedback.

#2about 6 minutes

Analyzing common form validation patterns and their pitfalls

Existing validation solutions often lack structure, are hard to test, and create tight coupling with UI frameworks.

#3about 2 minutes

Adopting a unit testing syntax for declarative validations

Vest is inspired by unit testing libraries like Mocha and Jest to create declarative, readable, and separate validation suites.

#4about 5 minutes

Live coding: Setting up a basic validation suite in React

Learn how to create a validation suite with Vest, connect it to a React form, and display error messages for individual fields.

#5about 5 minutes

Refining validation UX with field isolation and warnings

Use Vest's `only` function to validate a single field on interaction and implement non-blocking warnings for optional suggestions.

#6about 7 minutes

Implementing complex asynchronous and memoized validations

Manage asynchronous server-side checks, skip them conditionally with `skipWhen`, and prevent redundant calls using memoization.

#7about 2 minutes

A summary of Vest's features and future roadmap

Vest is a tiny, stateful library that offers declarative, framework-agnostic validations, with a full TypeScript rewrite in version 4.

#8about 5 minutes

Q&A: Handling dynamic forms and global validation rules

Learn how to handle debounced async calls, define global rules by extending `enforce`, and manage dynamic forms with `test.each` or manual cleanup.

Related jobs
Jobs that call for the skills explored in this talk.

test

Milly
Vienna, Austria

Intermediate

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
The State of HTML 2024: What can we learn from it?
The results of the State of HTML 2024 survey are in! Though the name suggests it’s HTML-only, the survey focuses on the web platform in a more general sense, giving us some fascinating insights into not only the state of the web, but also some sense ...
The State of HTML 2024: What can we learn from it?
LM
Luis Minvielle
Top 5 React Form Libraries for Developers
React is still one of the most popular web frameworks in the world, and even if promising JavaScript building blocks like Svelte enter the contest occasionally, React gets credit among frontend developers for how easy it is to develop user interfaces...
Top 5 React Form Libraries for Developers
CH
Chris Heilmann
Dev Digest 136 - No JS(on) of mine
News and ArticlesDouglas Crockford is our featured video, so let's talk about evolving JavaScript and all things JSON. Judicious JSON explains all the weird things in it, you can learn why it can be incredibly slow, people wonder what even is a JSON ...
Dev Digest 136 - No JS(on) of mine
CH
Chris Heilmann
Dev Digest 138 - Are you secure about this?
Hello there! This is the 2nd "out of the can" edition of 3 as I am on vacation in Greece eating lovely things on the beach. So, fewer news, but lots of great resources. Many around the topic of security. Enjoy! News and ArticlesGoogle Pixel phones t...
Dev Digest 138 - Are you secure about this?

From learning to earning

Jobs that call for the skills explored in this talk.