Recipe: validate a form and confirm in a modal
luastra/ui · luastra/data · controlled input · about 20 minutesCollect 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.