isMasterCardBool static method

bool isMasterCardBool(
  1. String? value
)

Implementation

static bool isMasterCardBool(String? value) {
  final inputValue = value ?? "";
  final regex = RegExp(
    r'^(5[1-5]\d{14}|2(2[2-9][1-9]\d{12}|2[3-9]\d{13}|[3-6]\d{14}|7[0-1]\d{13}|720\d{12}))$',
  );
  return regex.hasMatch(inputValue);
}