validPanCard static method

String? validPanCard({
  1. String? value,
})

Implementation

static String? validPanCard({String? value}) {
  if (value!.isEmpty) {
    return 'Please Enter your PanCard Number';
  } else if (!pancard.hasMatch(value)) {
    return 'Please Enter your valid PanCard Number';
  }
  return null;
}