From ea41029424571e8550307b250dfb60d56adc6652 Mon Sep 17 00:00:00 2001 From: sawontheboss4 Date: Mon, 4 Aug 2025 18:37:30 +0600 Subject: [PATCH] for TCV Age Validator --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 972699d..acc8b3e 100644 --- a/index.php +++ b/index.php @@ -22,9 +22,9 @@ function processInput($input) { // Step 2: Filter only 17 digits long strings if (preg_match('/^\d{17}$/', $cleanedInput)) { - // Step 3: Check if the first four digits are within 2004-2018 + // Step 3: Check if the first four digits are within 2007-2025 $firstFourDigits = substr($cleanedInput, 0, 4); - if ($firstFourDigits >= 2004 && $firstFourDigits <= 2018) { + if ($firstFourDigits >= 2007 && $firstFourDigits <= 2025) { return ['valid' => $cleanedInput]; } else { return ['invalid' => $cleanedInput, 'reason' => 'First four digits are not within 2004-2018'];