Codstak
    • Home
    • DSA
    • JavaScript
    • TypeScript
    • Node.js
    • React
    • More↓
      BlogReact PrepPricingDiscordNewsletterLeaderboard
    React challenge/easy

    Repair the Workspace Invite Form

    Challenge workspace

    15-20 min
    Lists and formsPath 9/33
    FormsConditional rendering

    Suggested first

    Repair the Announcement Composer

    Your workspace must pass its server-side browser checks to complete this challenge.

    Repair the Workspace Invite Form

    The form, state, labels, and error messages are already wired up. Complete handleChange, validate, and handleSubmit using plain JavaScript.

    Requirements

    • Update the matching field in form when the user types.
    • On submit, show field errors for a blank or whitespace-only name, an email that does not look like name@example.com, or a password shorter than 8 characters.
    • Show success when validation passes.

    Keep the provided form fields and error elements; their wording is up to you. You do not need to rebuild the markup. This exercise only validates the details locally—no TypeScript, server request, or retry flow is needed.