isValid static method
Returns true if PAN is valid.
Implementation
static bool isValid(String pan) {
final normalizedPan = pan.toUpperCase().trim();
if (!_regex.hasMatch(normalizedPan)) return false;
// 4th character represents status of the holder
const validStatus = 'CPHFATBLJG';
if (!validStatus.contains(normalizedPan[3])) return false;
return true;
}