-
-
Notifications
You must be signed in to change notification settings - Fork 382
London | Jan-26 | Abdul Moiz | Sprint 2 | Form Controls #954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
cjyuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1
According to https://validator.w3.org/, there are errors in your code. Can you fix them?
Suggestion
After you have made all the changes, share your code to an AI tool and ask it to review your code in terms of semantic, accessibility, typo, and consistency.
It can often help us catch errors, improve consistency, and reinforce best practices.
| <select id="colour" name="colour" required> | ||
| <option value="red">Red</option> | ||
| <option value="blue">Blue</option> | ||
| <option value="green">Green</option> | ||
| </select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a way to configure a <select> element so that no option is selected by default, allowing the user to make an explicit choice.
| <br><br> | ||
| <label for="email">Enter your Email:</label> | ||
| <br><br> | ||
| <input type="email" id="email" name="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" required> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use pattern in <input type="email"> when browsers can already perform built-in email validation?
| this will also help you fill in your PR message later--> | ||
| <label for="name">Enter your Name:</label> | ||
| <br><br> | ||
| <input type="text" id="name" name="name" required minlength="2" pattern="[A-Za-z\s]+"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you enforce a stricter validation rule to disallow any name that contains only space characters?

Learners, PR Template
Self checklist
Changelist
I created a form and ticked off the checklist in README.md file
Questions
N/A