mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
expose useReadMRZ hook for DocumentCameraScreen (#1188)
This commit is contained in:
committed by
GitHub
parent
c1d30d153a
commit
f2cceb3150
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user