You are on page 1of 3

Kingdom of Saudi Arabia ‫اﳌﻤﻠﻜﺔ اﻟﻌﺮﺑﻴﺔ اﻟﺴﻌﻮدﻳﺔ‬

Ministry of Education ‫وزارة اﻟﺘﻌﻠﻴﻢ‬


Jouf University
Faculty of Computer and ‫ﺟﺎﻣﻌﺔ اﳉﻮف‬
Information Sciences ‫ﻛﻠﻴﺔ ﻋﻠﻮم اﳊﺎﺳﺐ واﳌﻌﻠﻮﻣﺎت‬
Software Engineer Department
‫ﻗﺴﻢ ﻫﻨﺪﺳﺔ اﻟﱪﳎﻴﺎت‬

Assignment -1
Academic Year: 2024 Semester: Second
Department: Software Engineering
Course Name: Software Security Course Code: SWE 481
Instructor: Dr. Amjad Alsirhani Total Marks: 5
Number of Pages: 3 Number of Questions: 1:6

Student Name: Student ID:

This assignment is due on :

Thursday, April 18, 2024 at 11:59pm

Submit your assignment through blackboard

Objective:
• The objective of this assignment is to design and implement an input validation mechanism for a simple user

registration form.

• This assignment will provide students with hands-on experience in implementing input validation mechanisms

and understanding the significance of validating user input both on the client and server sides.
Kingdom of Saudi Arabia ‫اﳌﻤﻠﻜﺔ اﻟﻌﺮﺑﻴﺔ اﻟﺴﻌﻮدﻳﺔ‬
Ministry of Education ‫وزارة اﻟﺘﻌﻠﻴﻢ‬
Jouf University
Faculty of Computer and ‫ﺟﺎﻣﻌﺔ اﳉﻮف‬
Information Sciences
‫ﻛﻠﻴﺔ ﻋﻠﻮم اﳊﺎﺳﺐ واﳌﻌﻠﻮﻣﺎت‬
Software Engineer Department
‫ﻗﺴﻢ ﻫﻨﺪﺳﺔ اﻟﱪﳎﻴﺎت‬

Instructions:

1. Design a user registration form: Create a basic HTML form that includes the following fields:

- Name (text field)

- Email (text field)

- Password (password field)

- Confirm Password (password field)

- Submit button

2. Implement client-side input validation: Using JavaScript, implement client-side input validation for the
form fields. The validation rules are as follows:

- Name: Required field, should contain only alphabetic characters.

- Email: Required field, should be a valid email address format (e.g., example@example.com).

- Password: Required field, minimum length of 8 characters.

- Confirm Password: Required field, should match the Password field.

3. Display validation errors: If any of the form fields fail validation, display an appropriate error message next
to the respective field.

4. Implement server-side input validation: Design a server-side script (e.g., PHP, Python, etc.) that receives
the form data and performs server-side input validation using the same rules as the client-side validation.

5. Display success message: If all the form fields pass validation (both client-side and server-side), display a
success message indicating that the registration was successful.

6. Test the form: Test the form by submitting different combinations of valid and invalid data to ensure that
the input validation mechanism works as intended.
Deliverables:

1. HTML file: Include the HTML code for the user registration form.

2. JavaScript file: Include the JavaScript code for client-side input validation.

3. Server-side script: Include the code for server-side input validation.

4. Documentation: Write a brief report explaining your approach to input validation, challenges faced, and how
you overcame them.

Evaluation Criteria:

- Correct implementation of client-side input validation.

- Correct implementation of server-side input validation.

- Proper handling and display of validation errors.

- Successful registration message displayed when all the validations pass.

- Code readability and organization.

- Documentation quality and clarity.

Page 3 of 3

You might also like