This portfolio website includes a contact form with built-in validation using HTML5 attributes to ensure user input is correct and structured. HTML validation helps prevent errors and enhances user experience by providing instant feedback.
- required → Ensures that essential fields are not left empty.
- type → Specifies the type of input, such as email, number, or text, for automatic validation.
- placeholder → Provides hints for users to enter correct data.
- The input fields for name, email, and phone use appropriate types and patterns to enforce valid input.
- The textarea requires a minimum length to ensure detailed messages.
- The submit button is only enabled when all fields are correctly filled.
By using HTML5 validation, the form enhances accessibility and usability while reducing reliance on JavaScript for basic checks.