isCardCvv static method

String? isCardCvv(
  1. String? value
)

Implementation

static String? isCardCvv(String? value) {
  final inputValue = value ?? "";
  final regex = RegExp(r'^(?!0{3,4}$)\d{3,4}$');
  return regex.hasMatch(inputValue) ? null : "CVV 3 or 4 digits \n";
}