CIT041J Index > Assignment - Validation

CIT041J - Assignment - Validation

Read everything before doing anything.

Write functions to validate the input in the form which you can see at this linked page.

Here are the requirements for your validation.

When you click the “Send Data” button, your script will validate the form data. If there are any errors, they must all appear in the “Validation Errors” text area. If there are no errors, you will submit the form to http://evc-cit.info/cgi-bin/cit041j/validate.cgi, which will do a double-check of your data.

In your validation, you must distinguish between:

Make sure you enter bad data in the form to see that your validation code catches it. If you send the form with bad data, the server code will let you know.

You must use regular expressions in your validation code, though you don’t need to use it for every single conditon.

You may see a simulation of what the finished program should do. (Try entering bad data to see how it responds.) This simulation refreshes the screen every time you send data because it is not written in JavaScript. Your validation will put the errors into the box at the bottom of the page without having to refresh the screen; it will only refresh when everything is valid and the form is submitted to the server.

When You Finish

Name the file in the form lastname_firstname_form.html and send it to the instructor.