Basic Frontend Validations in React

Frontend validations provide 2 significant bits of value to a software project.

  • Immediate feedback when the data necessary is not correct.
  • Reduction of backend API calls, reducing server load.

You can find the final form of this project here

Exercises

Display an error on the form if the user fails to supply some data.

  1. Require the Name, Email, Password, and Password Confirmation fields.
  2. Require that the passwords match.
  3. Require that the person's name has a minimum of 3 characters.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.