javascript validator
The project was to create a pure JavaScript form validator for a fictitious signup
form. Elements include first name, last name, username, password, and confirm password, and
has dynamic error warnings to guide the user on what to change.
skills
- web development
technologies
- vscode
- html5
- css3
- javascript
html
A small portion of the project was spent making the HTML for the form. Main part of this section was to create the form itself which is just simply labels and form inputs. Password inputs have a type of password for security purposes.

javascript
The JavaScript for this project is the main portion of the time spent. Upon clicking the submit button, a validation script runs.
The first portion prevents the submission of the form as it’s a display form.
The next part of the script runs the actual validation portion where it runs a Boolean test to check each input for blanks, illegal characters based on the input type, minimum lengths, and matching strings for passwords. The illegal characters are evaluated using RegEx string tests checking for symbols, digits, capitals, and lowercase in passwords, and digits/symbols for names. The script function returns a valid variable with the value of true or false, which would allow for the submission to pass.
A third script is run in the final section to check if the validity check passes, and if not displays an error message with the problems. The form clears off errors as they are resolved and rechecked through use of the submit button.
The next part of the script runs the actual validation portion where it runs a Boolean test to check each input for blanks, illegal characters based on the input type, minimum lengths, and matching strings for passwords. The illegal characters are evaluated using RegEx string tests checking for symbols, digits, capitals, and lowercase in passwords, and digits/symbols for names. The script function returns a valid variable with the value of true or false, which would allow for the submission to pass.
A third script is run in the final section to check if the validity check passes, and if not displays an error message with the problems. The form clears off errors as they are resolved and rechecked through use of the submit button.

css
Just styling to make it look aesthetically pleasing. Borders around inputs have active pseudo classes to transition to a different color as a way of visual feedback.

view the live site here