London | 26-ITP-May | Gideon Defar | Sprint 1 | Form Control#1289
Open
gideondefar wants to merge 10 commits into
Open
London | 26-ITP-May | Gideon Defar | Sprint 1 | Form Control#1289gideondefar wants to merge 10 commits into
gideondefar wants to merge 10 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cjyuan
reviewed
May 17, 2026
| <p> | ||
| <label for="customerName">Name:</label> | ||
| <input type="text" id="customerName" name="customerName" required minlength="2" | ||
| pattern=".*\S.*" placeholder="Enter your full name"> |
Contributor
There was a problem hiding this comment.
Can you change the pattern so that it can reject names like "A " or " A"? (Name with only one non-space character but with many space characters)
Comment on lines
+28
to
+30
| <input type="email" id="emailAddress" name="emailAddress" required placeholder="you@example.com" | ||
| pattern="^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+([a-zA-Z]{2,63})$" | ||
| title="Please enter a valid email address (e.g., user@example.com). Domain parts (like 'example') must start and end with a letter or number, can contain hyphens, and must be separated by dots. Ends with a top-level domain (e.g., .com)."> |
Contributor
There was a problem hiding this comment.
Why specify the pattern when the input type is "email"? What difference does the pattern make?
When I tested the form, the input field still accepts "a@a" as a valid email.
Comment on lines
+37
to
+38
| <input type="radio" id="colourRed" name="shirtColour" value="red" required> | ||
| <label for="colourRed">Red</label> |
Contributor
There was a problem hiding this comment.
id values should follow the "kebab-case" naming convention. For example: color-red.
Note: If you wrap <input> inside <label>, you would not need to introduce id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Learners, PR Template
Self checklist
Changelist
I created a form control in HTML and checked the accessibility.