SarcinăQuick recap. Build a signup form that ships all 4 A3 muscle-memory pieces in one go. <form action='/api/signup' method='post'> with one labeled email input (id='em', name='email', type='email', required, minlength='6') and a submit button. The 4 checks below verify each piece.
Recap: Forms as the API contract
50 XP5 min
Teorie
Quick recap — Module A3
You spent 20 lessons on forms. The 4 things that MUST be muscle memory:
- `<form action method>` — the contract. Backend reads form-encoded body on POST.
- `<label for=...>` + matching
id— click-targets the input, screen readers announce it. - `required` / `type="email"` / `minlength` — browser validates before submit. No JS needed.
- `<button type="submit">` — the only button that fires the form.
type="button"does nothing by default.
If any of these feels random, redo the lesson that introduced it (A3-01 / A3-04 / A3-07 / A3-11) then come back.
🔒
Înregistrează-te pentru a începe să programezi
Teoria e accesibilă tuturor. Editorul, previzualizarea live și verificarea se deblochează cu o probă gratuită de 7 zile — card necesar, anulabilă oricând.
Înregistrare — probă gratuită →Primele 10 lecții din fiecare traseu sunt gratis. Fără card.