isValidCvv static method

bool isValidCvv(
  1. String cvv
)

Validate CVV format.

Checks if the CVV is 3-4 digits (standard for most card types).

Parameters

  • cvv: The CVV to validate

Returns

true if the CVV format is valid, false otherwise.

Implementation

static bool isValidCvv(String cvv) {
  return _cvvRegex.hasMatch(cvv);
}