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:
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.
Submitted by Harshita Gupta (atihsrah)
Download packets of source code on Coders Packet