cvcValidator function
Implementation
String? cvcValidator(String? value) {
if (value == null || value.isEmpty) {
return 'CVC is Required';
}
final regex = RegExp(r'^[0-9]{3}$');
if (!regex.hasMatch(value)) {
return 'Invalid CVC';
}
return null;
}