Problem
I found some issues with the forms on the website. When I tried to submit the newsletter form with an invalid email, it accepted it without any warning. Also, the contact form doesn't check if the input is valid
What I Found
-
Newsletter form accepts any email format
- Tried entering "test@" and it was accepted
- No warning message shown
-
Contact form has no validation
- Can submit empty forms
- No character limit on messages
How to Fix
-
Add proper email validation
- Check if email has proper format (e.g., "user@example.com")
- Show error message if email is invalid
-
Add basic form validation
- Make required fields mandatory
- Add maximum length for text inputs
- Show error messages to users
Example
Here's a simple example of how the email validation could work:
function checkEmail(email) {
if (!email.includes('@') || !email.includes('.')) {
alert('Please enter a valid email address');
return false;
}
return true;
}
Steps to Test
- Go to the newsletter form
- Try entering these invalid emails:
- "test@"
- "test@test"
- "test.com"
- Submit the form
- Check if you see any error messages
Expected Result
- Invalid emails should show error message
- Forms should not accept empty submissions
- No data should appear in browser console
Problem
I found some issues with the forms on the website. When I tried to submit the newsletter form with an invalid email, it accepted it without any warning. Also, the contact form doesn't check if the input is valid
What I Found
Newsletter form accepts any email format
Contact form has no validation
How to Fix
Add proper email validation
Add basic form validation
Example
Here's a simple example of how the email validation could work:
Steps to Test
Expected Result