London | 26-ITP-MAY | Khaliun Baatarkhuu | Sprint 1 | Form Controls #1431
London | 26-ITP-MAY | Khaliun Baatarkhuu | Sprint 1 | Form Controls #1431khaliun-dev wants to merge 6 commits into
Conversation
Added form fields for customer name and email with validation requirements.
Updated T-shirt size selection options and footer name.
Added CSS styles for form layout and elements.
✅ 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.
Form looks good. Code is well formatted and error free. Well done.
Can you address the comments left on the name input field?
| <input | ||
| type="text" | ||
| id="name" | ||
| name="name" | ||
| pattern=".*\S{2,}.*" | ||
| required | ||
| /> |
There was a problem hiding this comment.
-
When the user input is rejected, the browser shows "Please match the requested format" but it is not clear what the requested format is. Can you make it clearer to the user what format should a name be?
-
Should a name such as "C J" (with a space between two alphabets) be considered a name containing at least two non-space characters?
| <legend>Choose a Colour</legend> | ||
|
|
||
| <input type="radio" id="red" name="colour" value="red" required> | ||
| <label for="red">Red</label> |
There was a problem hiding this comment.
Note: Here's is an alternate markup that does not involve "id" and "for" attributes.
<label>
<input type="radio" name="colour" value="red" required>
Red
</label>
There was a problem hiding this comment.
Ok, understood. The input is inside the label attribute, making it easier to read and needing less code.
- Added "title" attribute to make it clearer for the user.
- Changed "pattern=".*\S{2,}.*" to "pattern=".*\S.*\S.*", because the former might not accept C J due to it being non consecutive.
|
Changes look good. Well done. |

Self checklist
Changelist
Questions
None so far