bool validateCVV(String name, String cvv) { var brand = _brands.firstWhere((element) => element.name == name.toLowerCase()); return RegExp(brand.cvvPattern).hasMatch(cvv); }