Professional Documents
Culture Documents
Assignment 1
Assignment 1
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
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:
- 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:
- Email: Required field, should be a valid email address format (e.g., example@example.com).
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.
4. Documentation: Write a brief report explaining your approach to input validation, challenges faced, and how
you overcame them.
Evaluation Criteria:
Page 3 of 3