This project is a user registration and newsletter subscription form that includes custom form validation, DOM manipulation, and interactive styling. It meets all specified requirements for SBA 316, demonstrating a comprehensive application of JavaScript, HTML, and CSS techniques.
The application features a User Registration Form with robust validation, enforcing minimum length requirements and a strong password policy. Users can create an account and receive feedback on successful registration. The project also includes a Newsletter Subscription Form and a Create Account button that toggles the registration form’s visibility. Interactive validation and dynamic feedback enhance user experience.
All project requirements are completed, as detailed below:
- Cache at least one element using
getElementById
. - Cache at least one element using
querySelector
orquerySelectorAll
. - Iterate over a collection of elements to accomplish a task.
- Used
forEach
to validate input fields and adjust styling based on field values.
- Used
- Create at least one element using
createElement
.- Created a welcome message element upon successful registration.
- Use
appendChild
orprepend
to add elements to the DOM.- Appended the welcome message to the page after successful registration.
- Modify HTML or text content based on user interaction (
innerHTML
,innerText
, ortextContent
).- Updated message content based on registration success or failure.
- Modify style or CSS classes of elements in response to user actions (
style
,classList
).- Adjusted input borders based on validation and added a highlight class to the form on hover.
- Modify at least one attribute of an element in response to user interaction.
- Set focus to specific fields with
.focus()
based on validation feedback.
- Set focus to specific fields with
- Use at least two BOM properties or methods.
- Used
alert()
for user feedback andlocation.href
to simulate a redirect after registration.
- Used
- Include a form or input with HTML attribute-based validation.
- Used
required
andminlength
attributes for form fields.
- Used
- Include DOM event-based validation for a form or input.
- Implemented custom validation for password complexity, minimum length, and confirmation matching, displaying error messages with
alert()
.
- Implemented custom validation for password complexity, minimum length, and confirmation matching, displaying error messages with
- Commit frequently to a git repository.
- Include a README file with a description of your application.