StaffCoder
Node.js
4 modules · 16 challengesSign up
Module 2 of 4 · 4 challenges

Node.js (TypeScript) Request Data & Validation

Read and check what comes in —-query params, JSON bodies, request headers. Apply defaults, coerce types, clamp limits, and reject bad input with the status that names the bad field (400/422) or header problem (401/403/415). Covers paging/filters/sort, schema validation with per-field errors, and request-header handling.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Invoice Search Filters

Sign up to unlock
—No data yeteasy
About this challenge

Sign up to see what this challenge asks.

Solved in a browser IDE and graded by tests. Sign up to solve

Dental Appointment Payload

Sign up to unlock
—No data yeteasy
About this challenge

A dental booking form that currently saves whatever it's sent. It must check the submitted data against a set of rules, report every bad field at once, and quietly drop fields it doesn't recognise.

Solved in a browser IDE and graded by tests. Sign up to solve

Print Shop Request Headers

Sign up to unlock
—No data yeteasy
About this challenge

A print-order service that ignores the metadata clients attach to a request. It must require an access key, accept only the right data format, and honour how the client wants the answer returned.

Solved in a browser IDE and graded by tests. Sign up to solve

Vendor Onboarding Intake

STAR
Solving it completes the module
—No data yeteasy
About this challenge

A supplier sign-up that says "OK" to everything, so clients can't tell success from rejection. Each outcome - accepted, invalid, duplicate, too-large — gets its own clear signal in one consistent response shape.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.