Coders Packet

Survey Form with Client Side Validation using HTML, CSS, and JavaScript

By Harshita Gupta

This is a frontend project built using HTML, CSS, and JavaScript, which strictly validates the input entered by the user/client, and immediately lets the user know if the entry is invalid.

This is a survey form, open the HTML file in your browser you can use this form. It uses the form validation in Javascript,

for eg: to check if the input entered is a number, the pattern we use is /^[0-9]+$/ and match it with the 'string' we want to check. JS code goes like this:

string.match(/^[0-9]+$/);

It returns true if a number is entered as input.

The below image is a form validation example of this project, which does not accept input until the requirements are not fulfilled or are not valid.

Also, it does not accept the form until the required fields are filled.

Download project

Reviews Report

Submitted by Harshita Gupta (atihsrah)

Download packets of source code on Coders Packet