From 2947cd50007bc427e3fd8dfd8b8b8c810972ff7b Mon Sep 17 00:00:00 2001 From: Raghav Sharma <53517312+raghavs046@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:10:31 +0530 Subject: [PATCH 1/3] Update PAN Validation.js --- .../Catalog Client Script/PAN Validation/PAN Validation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js b/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js index f566c0909b..4e3f9d0d26 100644 --- a/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js +++ b/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js @@ -4,8 +4,9 @@ function onChange(control, oldValue, newValue, isLoading, isTemplate) { } var panNumber = g_form.getValue("pan_number"); //Get the PAN card information var panRegex = /^[A-Z]{5}[0-9]{4}[A-Z]{1}$/; // Regex for the PAN Card + var panRegexAllCases = new RegExp(panRegex, "gim"); // Regex for checking PAN card in all cases(capital, lower,mixed) and multiline text fields. - if (panRegex.test(panNumber)) { + if (panRegexAllCases.test(panNumber)) { g_form.showFieldMsg("pan_number", "Valid PAN card number.", true); //Valid PAN card enterd populates this message } else { g_form.showErrorBox("pan_number", "InValid PAN card number.", true); //In Valid PAN card details enterd populate this message From bcfdd7a643ffb40acee53a131a4b854c3cbaaecf Mon Sep 17 00:00:00 2001 From: Raghav Sharma <53517312+raghavs046@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:14:18 +0530 Subject: [PATCH 2/3] Update README.md --- .../Catalog Client Script/PAN Validation/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Client-Side Components/Catalog Client Script/PAN Validation/README.md b/Client-Side Components/Catalog Client Script/PAN Validation/README.md index 1d495cafd2..7beb96656d 100644 --- a/Client-Side Components/Catalog Client Script/PAN Validation/README.md +++ b/Client-Side Components/Catalog Client Script/PAN Validation/README.md @@ -1,3 +1,10 @@ +Enhancement 7th october 2025. +************************ +1. This code can now be used to validate PAN card in multiline text fields. +2. This code can now validate PAN in upper, lower, mixed cases. +3. This will provide more flexibility to users to add pan number as it is valid in both lower and upper cases. +*********************** + PAN is a ten-digit unique alphanumeric number issued by the Income Tax Department. Indian PAN (Permanent Account Number) card based on its standardized format. A PAN number is a unique 10-character alphanumeric identifier issued by the Indian government, and it follows a specific structure: From 945094023f67b815b03a654723ac17b0979b6fc7 Mon Sep 17 00:00:00 2001 From: Raghav Sharma <53517312+raghavs046@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:15:20 +0530 Subject: [PATCH 3/3] Update PAN Validation.js --- .../Catalog Client Script/PAN Validation/PAN Validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js b/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js index 4e3f9d0d26..ab6834fe8c 100644 --- a/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js +++ b/Client-Side Components/Catalog Client Script/PAN Validation/PAN Validation.js @@ -4,7 +4,7 @@ function onChange(control, oldValue, newValue, isLoading, isTemplate) { } var panNumber = g_form.getValue("pan_number"); //Get the PAN card information var panRegex = /^[A-Z]{5}[0-9]{4}[A-Z]{1}$/; // Regex for the PAN Card - var panRegexAllCases = new RegExp(panRegex, "gim"); // Regex for checking PAN card in all cases(capital, lower,mixed) and multiline text fields. + var panRegexAllCases = new RegExp(panRegex, "gim"); // Regex for checking PAN card in all cases(UPPER,lower,miXeD) and multiline text fields. if (panRegexAllCases.test(panNumber)) { g_form.showFieldMsg("pan_number", "Valid PAN card number.", true); //Valid PAN card enterd populates this message