From 1d9db38b4bf6e65f8b4f99e0bb5cf4ba9c02109d Mon Sep 17 00:00:00 2001 From: Richard Date: Sat, 24 Jan 2026 01:11:42 +0000 Subject: [PATCH 1/2] Create accessible t-shirt order form with HTML validation --- Form-Controls/index.html | 121 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 113 insertions(+), 8 deletions(-) diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 65a866cdb..b8ecce5c0 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -1,27 +1,132 @@ + - My form exercise - + + + My form exercise + + + + +

Product Pick

+ +
+
- - + +

Please complete all required fields.

+ + +
+

Customer details

+ + +

+
+ +

+ + +

+
+ +

+
+ + +
+

T-shirt options

+ + +
+ Colour + + + +

+ + +

+ +

+ + +

+ +

+ + +

+
+ + +

+
+ +

+
+ + +

+ +

+ +
+ + From 9ff77c3e80d032dd4f6423fb7fc49e630b920419 Mon Sep 17 00:00:00 2001 From: Richard Date: Sat, 24 Jan 2026 16:24:33 +0000 Subject: [PATCH 2/2] Add pattern validation to reject whitespace-only names --- Form-Controls/index.html | 96 ++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 34 deletions(-) diff --git a/Form-Controls/index.html b/Form-Controls/index.html index b8ecce5c0..bca2ae3cb 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -1,47 +1,67 @@ - + - - My form exercise + + Product Pick | T-shirt Order Form - - + + - +

Product Pick

- +
+ +
- +

Please complete all required fields.

- +

Customer details

- +


Customer details type="text" required minlength="2" + pattern="^\S(.*\S)?$" + title="Name must be at least 2 characters and cannot be only spaces." autocomplete="name" />

- +


Customer details

- +

T-shirt options

- +
Colour - -

T-shirt options

- +