Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
abdishakoor-dev
left a comment
There was a problem hiding this comment.
Nearly there. The dropdowns and the submit button do what they should. It's the name check that has gone wrong, then two small things:
- Name validation is the wrong way round. On the deploy preview, type a single space as the name and submit, it goes through. Type
ABand it's rejected. See line 21. - The footer still says HOMEWORK SOLUTION, line 63.
- Formatting. Prettier fails on both files. Run
npx prettier --write Form-Controlsfrom the repo root and push.
Your question: a separate CSS file linked from the head, which is what you've done, is the right way. The task only says HTML and CSS, and keeping the styling in its own file is the normal practice.
Add the Needs Review label again once you've pushed.
| <label for="name">Name:</label> | ||
| <!-- must enter name at least with two non space characters--> | ||
| <input type="text" id="name" name="name" | ||
| pattern=".*\s.*\s*" required title ="Please enter full name"/> |
There was a problem hiding this comment.
Compare this with the regex in the README one character at a time. The README uses a capital S. What's the difference between \s and \S? That's why a space passes and AB doesn't.
There was a problem hiding this comment.
oh I have not noticed. thank you . I will make amends
There was a problem hiding this comment.
Closer. See the new comment on line 19.
There was a problem hiding this comment.
That's it. A is rejected now and AB goes through.
| font-size:20px; | ||
|
|
||
| } | ||
| /* |
There was a problem hiding this comment.
Commented-out code. The style guide asks for this to be removed rather than kept. Git has it if you want it back.
| <div> | ||
| <button type="submit"> Submit</button> | ||
| </div> | ||
| <!-- |
There was a problem hiding this comment.
This and the other starter comments (lines 17 and 62) were instructions for you. Now they're done, they can go.
abdishakoor-dev
left a comment
There was a problem hiding this comment.
Footer done and the comments cleared, thanks. Two things left before I can mark this Complete:
- The name check is closer but still lets a single letter through. Type
Aon the deploy preview and submit. See line 19. - The formatting check. "My code is consistently formatted" is on the README checklist, and the tool that does it for you is called Prettier. It rearranges spacing and indentation to one agreed style, so that your code is easy to read and so that a reviewer only sees the changes you meant to make, not stray spaces and tabs. At the moment both of your files fail that check.
Prettier comes with the CYF extension pack you were asked to install during onboarding. If you're not sure you have it, open VS Code, go to Extensions, and search for CodeYourFuture Extension Pack; install it if it isn't there: https://marketplace.visualstudio.com/items?itemName=CodeYourFuture.cyf-extension-pack
Then open each of your two files, right click in the editor, choose Format Document, and pick Prettier if VS Code asks which formatter to use. Save, commit the changes it makes, push, and add the Needs Review label again. To make this happen automatically every time you save, follow the format on save steps here: https://github.com/CodeYourFuture/Module-JavaScript-Fundamentals/blob/main/practical_guide.md
| <form> | ||
| <label for="name">Name:</label> | ||
| <input type="text" id="name" name="name" | ||
| pattern=".*\S.*\S*" required title ="Please enter full name"/> |
There was a problem hiding this comment.
Nearly. Put yours and the README's side by side and look at the last three characters of each. What does * mean after \S, and how many non-space characters does that make the minimum?
|
I have made the necessary changes according to your comments. |
abdishakoor-dev
left a comment
There was a problem hiding this comment.
The name check now does what the task asks, and both files are formatted. Nothing left to do, so I'm marking this Complete. Well done Maharit.

Learners, PR Template
Self checklist
Task code
CYF-1004
Changelist
I have written all the labels needed to be written on the index.html and tested it using the dev tool .And alsoi have created new file which is .css file to style the web page .
Questions
1.Did i need to create the css file or should I have included it in the index.html ?