isValidTan static method

bool isValidTan(
  1. String tan
)

Validates Indian TAN (Tax Deduction Account Number)

Implementation

static bool isValidTan(String tan) {
  final tanRegex = RegExp(r'^[A-Z]{4}[0-9]{5}[A-Z]{1}$');
  return tanRegex.hasMatch(tan.toUpperCase());
}