yogeshtakeo / BFD36_files

0 stars 0 forks source link

Task 15: Form Validation in React #16

Open yogeshtakeo opened 1 year ago

yogeshtakeo commented 1 year ago

Frontend Development Bootcamp - React Form Validation

Task Description

In this task, you will create a React project that involves form validation. You will build a form with validation rules and error messages, passing data from child components to the parent using parameters (props), and implementing a UI design created in Figma.

Prerequisites

Before you begin, ensure you have the following resources:

Task Steps

Step 1: UI Design in Figma

  1. Start by designing the user interface for your project using Figma. Create a design that includes a form with various input fields (e.g., name, email, password) and validation error messages. Design a visually appealing layout that adheres to UI/UX principles.

  2. Once your design is complete, export relevant assets (e.g., icons, fonts) if needed.

Step 2: Set Up a React Project

  1. Create a new React project directory using Vite. Open your terminal and navigate to the directory where you want to create your project.

  2. Run the following command to create a new Vite project with React:

    npm init vite@latest my-react-form-validation --template react
  3. Navigate into your project directory:

    cd my-react-form-validation

Step 3: Implement the UI

  1. Create React components for your UI based on the design you created in Figma. This should include a form with input fields and validation error messages.

  2. Use CSS or a CSS-in-JS library like Styled Components to style your components and match the Figma design.

Step 4: Form Validation

  1. Implement form validation rules for the input fields (e.g., required, email format, password strength). You can use the useState hook to manage form state and onChange event handlers to capture user input.

  2. Display error messages next to the relevant input fields when validation fails.

Step 5: Data Passing

  1. Create child components (e.g., InputField) that represent individual form input fields.

  2. Implement data passing from child to parent using props. For instance, when an input field changes, it should send its value to the parent component for validation.

Step 6: Testing

  1. Start the development server by running:

    npm run dev
  2. Open your web browser and navigate to http://localhost:3000 to see your React form validation project in action.

  3. Test the form with various inputs to ensure that validation rules and error messages work correctly.

Step 7: Documentation

  1. Document the steps you took to create the project, including setting up the development environment, designing the UI in Figma, implementing form validation, and passing data from child components to the parent.

  2. Include screenshots or links to your Figma design for reference.

Cheesesth1 commented 1 year ago

Name: Chij Team 1 (leader Shanti) Task: Form Validation https://github.com/shantibasnet/userForm image image image

shantibasnet commented 1 year ago

Name: Shanti Basnet Task15 :Form validation Url: https://github.com/shantibasnet/userForm/tree/shanti-form

image image image image
sansubed commented 1 year ago

Name: Santona Subedi Task 15: Form validation in react git url repo: https://github.com/sansubed/ReactViteAppTask15.git Screenshot 2023-10-02 at 5 59 28 PM

Screenshot 2023-10-02 at 6 00 40 PM Screenshot 2023-10-02 at 6 01 07 PM

Screenshot 2023-10-02 at 6 03 29 PM

Youngbikalp commented 1 year ago

Name: Bikalp Timalsina Team 3 Task 15: Form Validation in React Git Url: https://github.com/Youngbikalp/Task-15-Form-Validation-in-React image image image

Narayanadhikari9 commented 1 year ago

Name: Narayan Adhikari Task 15: Form Validation in React Url: https://github.com/Narayanadhikari9/Task-15-Form-Validation-in-React-bikalp Task15(1) Task15(2) Task15(3)

mbasnet123456 commented 1 year ago

Name: Manoj Basnet Team 3 Task 15: Form Validation in React Url-https://github.com/mbasnet123456/Task-15-Form-Validation-in-React-bikal image

raj-maharjan99 commented 1 year ago

Team2 / Raj, Anil, Madhav

image

aniltimalsina commented 1 year ago

Name: Anil Timalsina Task 15: Form Validation in React Github Link : https://github.com/aniltimalsina/form-validation.git

Screenshot 2023-11-16 at 6 02 54 PM Screenshot 2023-11-16 at 6 03 08 PM