diff --git a/src/utils/mrz.ts b/src/utils/mrz.ts index c005fa8e..43c47d96 100644 --- a/src/utils/mrz.ts +++ b/src/utils/mrz.ts @@ -27,7 +27,11 @@ const DEFAULT_FIELD = { field: 'nationality', format: (value, _) => value.replace(/0/, 'O'), }, - gender: { field: 'sex' }, + gender: { + field: 'sex', + + format: (value, _) => (value === 'M' ? 'male' : 'female'), + }, birthDate: { field: 'birth_date', format: (value, _) => moment(value, 'YYMMDD').format('YYYY-MM-DD'),