They are shown when you run the tests. Until then they appear as a hidden requirement.
Build a sign-up form that validates on submit and shows one error per field. You practice controlled forms and handling the submit event.
Email and Password labels, the message texts and the roles: the tests use them.something@domain.ext, Invalid email appears in an element with role="alert".Password must be at least 8 characters long appears in an element with role="alert".Account created appears in an element with role="status" and no error.bad and 123, and submit → you see both errors.ada@example.com and 12345678, and submit → you see Account created.Store the email and the password in state, and the errors in another piece of state.
Validate inside the onSubmit handler, not while typing.
Call event.preventDefault() so the form does not reload the page.
onSubmit event and preventDefault.The console is empty
Run your code with Ctrl+S
This console starts empty every time the preview loads. The browser's DevTools console keeps the messages with Preserve log.