For the complete documentation index, see llms.txt. This page is also available as Markdown.

rules

OCR validation rules by country before extraction.

Details

Attribute: rules

Type: RulesSchema

Default value: {}

RuleName

Member
Value
Description

FirstName

firstName

Holder's first name in the document.

LastName

lastName

Holder's last name.

Gender

gender

Holder's gender.

Nationality

nationality

Holder's nationality.

PlaceOfBirth

placeOfBirth

Place of birth.

DateOfBirth

dateOfBirth

Date of birth.

DateOfIssue

dateOfIssue

Document issue date.

DateOfExpiry

dateOfExpiry

Document expiration date.

DocumentNumber

documentNumber

Document number.

RuleTypes

Member
Value
Description

EqualTo

equalTo

The extracted value must be equal to the specified one.

Contains

contains

The extracted value must contain the specified one.

Required

required

The field is required (value: true).

MaxLength

maxLength

Maximum field length (number).

MinLength

minLength

Minimum field length (number).

EqualLength

equalLength

Exact length of the extracted value (number).

EngineDocumentTypes

Member
Value
Description

ID

ID

Identity document.

DL

DL

Driver's license.

PASSPORT

PASSPORT

Passport.

Morphology

Description

Rule schema by country code (ISO) applied before extraction in facephi-selphid-widget. Each entry in the array defines the field (key), the rule type (rule), the comparison value (value) and, optionally, the document types (documentTypes) and the document side (documentSide: 0 front, 1 back).

Considerations

JS property only (no HTML attribute). If it is not defined, no rule is applied to the capture process.

Each rule follows the type RuleSchema:


Example

Last updated