Skip to content

leylamemiguven/express-validator

Repository files navigation

Express Validator

Overview

This project is an example of using Express.js with validation middleware to handle user input. It demonstrates how to use the express-validator package to validate and sanitize form data in an Express.js application. The user can input infromation about users, update the information and search for users that are saved. This project was built as part of the Odin Project course on full-stack web development. https://www.theodinproject.com/paths/full-stack-javascript/courses/nodejs

Features

  • Form Validation: Validate user input with various rules.
  • Error Handling: Gracefully handle validation errors and display user-friendly messages.
  • Express Integration: Seamlessly integrates with Express.js for server-side validation.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v12.x or higher)
  • npm (Node package manager)

Installation

  1. Clone the repository:

    git clone https://github.com/leylamemiguven/express-validator.git
    cd express-validator
  2. Install dependencies:

npm install
  1. Running the Application
npm start

OR

node --watch app.js

If you want to make debugging easier.

Application Overview

Home page

Upon launching the app you will be greeted with a page where you can either create a new user or search the pile of existing users. Screenshot (100)

Adding New Users

Screenshot (101)

Users created will be shown on the home page after Screenshot (102)

Updating Existing Users

If a user wants to update an already existing user's property, it will be shown on the home page.

Screenshot (103)

Screenshot (104)

Searching Users

A user can be searched by their first name or last name. The results will be shown in the Search Results page.

Screenshot (105) Screenshot (106)

Feel free to enhance or customize this project as needed!

About

A simple application where users can add, edit, delete and search for users in a list.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors