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..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,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(UPPER,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 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: