jack-portfolio
jack-portfolio copied to clipboard
feat: Add form validations and success message to contact form
Summary: This PR enhances the contact form by adding client-side validations and a success message. The changes aim to improve the user experience by ensuring valid inputs and providing feedback upon successful submission.
Changes Made:
- Added HTML5 validation attributes (
pattern,minlength,maxlength) to enforce input constraints. - Included a success message that appears dynamically after form submission.
- Implemented JavaScript to handle form validation, display the success message, and reset the form fields.
Testing:
- Verified that all fields are validated correctly.
- Tested responsiveness across different screen sizes.
- Ensured alignment with existing CSS styles and framework conventions.
Related Issue: Closes #8