validateCVV static method

String? validateCVV(
  1. String value
)

Implementation

static String? validateCVV(String value) {
  if (value.isEmpty) {
    return UIStrings.fieldReq;
  }

  if (value.length < 3 || value.length > 4) {
    return "CVV is invalid";
  }
  return null;
}