expose useReadMRZ hook for DocumentCameraScreen (#1188)

This commit is contained in:
Leszek Stachowski
2025-10-03 00:26:40 +02:00
committed by GitHub
parent c1d30d153a
commit f2cceb3150
7 changed files with 389 additions and 107 deletions

View File

@@ -2,23 +2,6 @@
// SPDX-License-Identifier: BUSL-1.1
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
export function checkScannedInfo(
passportNumber: string,
dateOfBirth: string,
dateOfExpiry: string,
): boolean {
if (passportNumber.length > 9) {
return false;
}
if (dateOfBirth.length !== 6) {
return false;
}
if (dateOfExpiry.length !== 6) {
return false;
}
return true;
}
// Redacts 9+ consecutive digits and MRZ-like blocks to reduce PII exposure
export const sanitizeErrorMessage = (msg: string): string => {
try {