This project focuses on advanced form interactivity and client-side validation using JavaScript events. The HTML provides the form structure with fields like Name, dependent State/City selectors, Email, and Password, alongside elements for feedback like an error summary and password strength indicator. The JavaScript is centered on the validarCampos() function, which runs on various input changes. This function checks for required fields, validates email format, assesses password strength (via avaliarForcaSenha), and verifies the acceptance of terms. It dynamically updates a summary of errors and controls the disabled state of the Submit button. Real-time feedback includes color-coded password strength and dynamic population of the City select based on the chosen State. The form's submit listener prevents default submission, ensures final validation, and upon success, resets the form and provides an alert, demonstrating a robust and controlled user experience.
-
Notifications
You must be signed in to change notification settings - Fork 0
faça em 2 linhas This project enhances form UX using JavaScript events for real-time interactivity (counters, dependent selects) and robust client-side validation using submit with preventDefault(). It prioritizes accessible feedback and ensures the form, complete with password strength indicators, is only submittable when all fields are valid.
herculesbuen47-coder/Project-2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
faça em 2 linhas This project enhances form UX using JavaScript events for real-time interactivity (counters, dependent selects) and robust client-side validation using submit with preventDefault(). It prioritizes accessible feedback and ensures the form, complete with password strength indicators, is only submittable when all fields are valid.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published