validate method

bool validate(
  1. String uic
)

Validates a digit-only UIC number. Make sure uic only contains digits.

Implementation

bool validate(String uic) {
  final validLuhn = _luhn.validate(uic);
  final uicDetailsService = UICDetailsService();
  final validDigits = uicDetailsService.determineCategory(uic) != null;
  return validLuhn && validDigits;
}