Validate user input

Validate user input in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Users can submit the profile form with empty phone numbers. Add client-side validation that checks…
Users can submit the profile form with empty phone numbers. Add client-side validation that checks phone is numeric and 10 digits, shows the error message under the field, and blocks submission until corrected. Coordinate with Priya in UX for the error copy and deploy the change by Tuesday.

Improve — make it easier to accept

+
Before I hand this to QA, make the input validation reviewer-friendly: put the validation rules at…
Before I hand this to QA, make the input validation reviewer-friendly: put the validation rules at the top of the module, show the exact error strings next to each rule, and highlight any validators that accept malformed input like leading plus signs or spaces.

Decide — diagnose the stuck moment

+
I added a validator to the signup form and now some international users report their phone numbers…

validation rejects valid formatted numbers

I added a validator to the signup form and now some international users report their phone numbers are rejected. I wrote a strict 10-digit numeric rule because legal asked for consistency, but I don't know which countries we must accept. I can't change policy alone. What's the likely compromise that preserves compliance but doesn't block legitimate users, and how should I present this to legal and product?

Become — change the pattern

+
We repeatedly lose time because validation rules live in many components, producing inconsistent…

validators scattered across files and inconsistent

We repeatedly lose time because validation rules live in many components, producing inconsistent error copy and duplicate bugs. Which habit should we adopt to centralize validation, how to version rules, and a lightweight gating step so changes don't break client or server expectations?

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.