Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Loading