validateCVV method

String validateCVV(
  1. String value
)

Implementation

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

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