Skip to content

Conversation

@JohnnyBoyV
Copy link

@JohnnyBoyV JohnnyBoyV commented Jan 23, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Added form to collect the user's name, email, desired colour of t-shirt and size.
It validates the information that is submitted into it and all fields are required as requested.
Changed footer to my name.

Questions

None at this time.

@JohnnyBoyV JohnnyBoyV added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 23, 2026
@netlify
Copy link

netlify bot commented Jan 23, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 8eeca9e
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/697e0cb845c0f10008037e31
😎 Deploy Preview https://deploy-preview-1029--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 83 (🔴 down 3 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codes looks great.

Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 31, 2026
@JohnnyBoyV
Copy link
Author

@cjyuan Thank you for the review. I have made the change, is it good now?

@JohnnyBoyV JohnnyBoyV added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module labels Jan 31, 2026
@JohnnyBoyV
Copy link
Author

I believe the current validation error is due to #1099 and is not my fault?

@JohnnyBoyV JohnnyBoyV added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 31, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Jan 31, 2026

Changes look good. With that pattern, can a user enter a name with one letter follows by one space? (Just checking your understanding, no change needed)

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 31, 2026
@JohnnyBoyV
Copy link
Author

JohnnyBoyV commented Jan 31, 2026

@cjyuan Thanks again!

And yes, they can since ".*\S.*" is only looking for it only being spaces and a space is a character so 1 character plus 1 space clears the 2 character minimum validation.
I could fix it by instead using regex "pattern="(?:\S.*){2,}""

I understand no change was needed but I did it anyway and seems to work well on my end.

@cjyuan
Copy link
Contributor

cjyuan commented Jan 31, 2026

Good work. The next challenge would be to understand the meaning of the regular expression (?:\S.*){2,} and also take times to learn regular expressions. You will likely need to use it very often in the future.

To further improve the accessibility and user friendliness on the form, we can provide a custom description of the rule imposed on the input field (e.g., name must contains at least two letters). Without this custom message, the browser will only show something like "Please match the requested format".

I am just suggesting possible directions. No change needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants