cvvValidator static method

String? cvvValidator(
  1. String? value
)

Implementation

static String? cvvValidator(String? value) {
  if (value == null || value.isEmpty) {
    return "cvv cannot be empty ";
  }
  if (value.length != 3) {
    return "cvv must be exactly 3 characters long";
  }
  return null;
}