Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def validate_result(self, pattern_text):
sanitized_value = CreditCardRecognizer.__sanitize_value(pattern_text)
checksum = CreditCardRecognizer.__luhn_checksum(sanitized_value)
return checksum == 0
def validate_result(self, pattern_text):
sanitized_value = CreditCardRecognizer.__sanitize_value(pattern_text)
checksum = CreditCardRecognizer.__luhn_checksum(sanitized_value)
return checksum == 0