Skip to content

Commit 7a1ef60

Browse files
Limit birth year input to 4 digits max (brisbanesocialchess#375) (brisbanesocialchess#378)
* Fix birth year input limit to 4 digits in new structure - Updated frontend/register.md with oninput handler - Keeps last 4 digits when user types more than 4 digits - Addresses issue brisbanesocialchess#375 with new site generator structure * Remove semicolon from oninput attribute per BaseMax feedback --------- Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
1 parent e72f885 commit 7a1ef60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/register.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ title: Register
1818
</div>
1919
<div class="form-group">
2020
<label for="birthYear">Birth Year <span aria-hidden="true">*</span> </label>
21-
<input type="number" id="birthYear" name="birthyear" min="1900" max="2025" required placeholder="e.g. 1990" />
21+
<input type="number" id="birthYear" name="birthyear" min="1900" max="2025" oninput="if (this.value.length > 4) this.value = this.value.slice(-4)" required placeholder="e.g. 1990" />
2222
</div>
2323
<fieldset class="form-group">
2424
<legend>Gender <span aria-hidden="true">*</span></legend>

0 commit comments

Comments
 (0)