Skip to content

Conversation

@marthak1
Copy link

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

Summary

This project demonstrates basic HTML form validation

Changes

-added fields to enter customer details
-added fields to select T-shirt colour
-added fields to pick a size
-ensured input validation

References

Sprint 2 Backlog – Task: Form Controls

@netlify
Copy link

netlify bot commented Jan 18, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 65ea9f7
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/696c362f6a93fe000883b164
😎 Deploy Preview https://deploy-preview-978--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: 89 (🟢 up 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.

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 18, 2026
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.

  • Lighthouse score is 93/100.

    • Reason: Touch targets do not have sufficient size or spacing.
  • Consider aligning the wording used in the legend so similar items are described consistently. This helps users understand the information more quickly.

Customer Details
T-Shirt Color Preference
Choose Your T-Shirt Size

  • In the PR description, to create list items in Markdown, we need to leave a space between - and the text.

Comment on lines +22 to +23
<input type="text" id="name" name="name" minlength="3" maxlength="15" autocomplete="name"
placeholder="enter your name" required>
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Author

Choose a reason for hiding this comment

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

Thank for pointing this out. I hadn't considered that scenario.

Comment on lines +27 to +28
<input type="email" id="email" name="email" autocomplete="email" placeholder="enter your email"
pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" required>
Copy link
Contributor

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">?
Browsers can already perform built-in email validation.

Copy link
Author

Choose a reason for hiding this comment

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

The regex pattern was used intentionally to enforce stricter email validation. This compliments native browser validation. It's like a defence in depth approach.

@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 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants