validateCVV method

bool validateCVV(
  1. String name,
  2. String cvv
)

Implementation

bool validateCVV(String name, String cvv) {
  var brand = _brands.firstWhere((element) => element.name == name.toLowerCase());

  return RegExp(brand.cvvPattern).hasMatch(cvv);
}