Recipe: validate a form and confirm in a modal

luastra/ui · luastra/data · controlled input · about 20 minutes

Collect a name and email, expose field-specific accessible errors, review normalized values in a modal, and confirm without trusting raw input.

You will submit an empty form, correct both highlighted fields, review trimmed values in a modal, and either return to editing or confirm.

TextInput is controlled: onInput updates Luau state, and the next render returns that value. Data validates byte bounds; the application adds its own small email-format rule.

Validation failure is ordinary application state. Do not throw, log personal form values, or open the modal until every required rule passes.

Detail pages

1. Create the project2. Replace luastra.json3. Replace src/main.luau4. Replace tests/smoke.luau5. Check and run6. Understand the boundaries