Description:
- Enforces valid month (01–12) and day (01–31) in the preamble date regex.
- Prevents invalid inputs like 2023-00-00 from passing validation.
Description:
198@@ -199,7 +199,8 @@
199 die "First Comments-URI must be exactly \"$first_comments_uri\" in $fn" unless $val eq $first_comments_uri;
200 }
201 } elsif (exists $DateField{$field}) {
202- die "Invalid date format in $fn" unless $val =~ /^20\d{2}\-(?:0\d|1[012])\-(?:[012]\d|30|31)$/;
203+ # Enforce valid month (01-12) and day (01-31), disallow 00
0 # Enforce date format 20XX-MM-DD, where XX is 00-99, MM is 01-12 and DD is 01-31.
Co-authored-by: Jon Atack <jon@atack.com>