Index
ValidatorInput(message)ValidatorInput.ValidationRule(message)ValidatorInput.ValidationRule.AlignmentRule(message)ValidatorInput.ValidationRule.AlignmentRule.AlignmentType(enum)ValidatorInput.ValidationRule.ChildAlignmentRule(message)ValidatorInput.ValidationRule.Constant(message)ValidatorInput.ValidationRule.EntityAlignmentRule(message)ValidatorInput.ValidationRule.Field(message)ValidatorInput.ValidationRule.FieldOccurrences(message)ValidatorInput.ValidationRule.FieldRegex(message)ValidatorInput.ValidationRule.FormValidation(message)ValidatorInput.ValidationRule.FormValidation.Operation(message)ValidatorInput.ValidationRule.FormValidation.Operation.OperationType(enum)ValidatorInput.ValidationRule.FormValidation.RelationalOperator(enum)
ValidatorInput
Definition of the validation rules. Those are the input to the validator logic and they are used to validate a document. Next ID: 3
| Fields | |
|---|---|
validation_rules[] |
|
ValidationRule
Next ID: 9
| Fields | |
|---|---|
rule_id |
Unique identifier of the rule. Optional. |
name |
Name of the validation rule. |
description |
Description of the validation rule. This has no use but for documentation. |
Union field
|
|
field_occurrences |
|
field_regex |
|
form_validation |
|
child_alignment_rule |
|
entity_alignment_rule |
|
AlignmentRule
A rule for checking field alignment. Horizontal alignment checks if fields are on the same row by comparing y-coordinates of bounding box centers, while vertical alignment checks if fields are on the same column by comparing x-coordinates of bounding box centers.
| Fields | |
|---|---|
alignment_type |
|
tolerance |
The tolerance to use when comparing coordinates. |
AlignmentType
| Enums | |
|---|---|
ALIGNMENT_TYPE_UNSPECIFIED |
|
ALIGNMENT_TYPE_HORIZONTAL |
|
ALIGNMENT_TYPE_VERTICAL |
|
ChildAlignmentRule
A rule that aligns specified child fields with a parent field.
| Fields | |
|---|---|
parent_field |
The full path of the parent field. |
child_fields[] |
The child fields to be aligned within the parent field. |
alignment_rule |
The alignment rule to apply to the child fields. |
Constant
The constant value used in the validation rules.
| Fields | |
|---|---|
float_value |
|
EntityAlignmentRule
A rule that aligns specified fields with each other.
| Fields | |
|---|---|
fields[] |
The fields to be aligned. |
alignment_rule |
The alignment rule to apply to the fields. |
Field
| Fields | |
|---|---|
field_name |
The field name to validate. This can be a simple field name or a nested field one using the ':' (meant as an aggregator) or '*' (meant as foreach) operators. |
default_value |
Default value to use if the field is not present. If the field is missing and the default value is not set, the validation run as if the field is not present in the validation logic. |
FieldOccurrences
| Fields | |
|---|---|
field |
|
min_occurrences |
Min and max occurrences of the field. If not set, there is limit set. The defined interval is a closed-closed interval, i.e. [min, max]. |
max_occurrences |
|
FieldRegex
| Fields | |
|---|---|
field |
|
pattern |
Python regex to validate the field values. |
FormValidation
| Fields | |
|---|---|
left_operand |
|
right_operand |
|
validation_operator |
The relational operator to be applied to the operands. |
Operation
| Fields | |
|---|---|
fields[] |
A list of fields to be used as operands. |
constants[] |
A list of constants to be used as operands. |
operations[] |
A list of recursive operations to be used as operands. |
operation_type |
The operation type to be applied to all the operands. |
OperationType
| Enums | |
|---|---|
OPERATION_TYPE_UNSPECIFIED |
|
OPERATION_TYPE_SUM |
|
OPERATION_TYPE_SUB |
|
OPERATION_TYPE_MUL |
|
OPERATION_TYPE_DIV |
|
OPERATION_TYPE_MAX |
|
OPERATION_TYPE_MIN |
|
OPERATION_TYPE_ABS |
|
OPERATION_TYPE_UNIQUE |
|
OPERATION_TYPE_COUNT |
|
RelationalOperator
| Enums | |
|---|---|
OPERATION_TYPE_UNSPECIFIED |
|
OPERATION_TYPE_EQ |
|
OPERATION_TYPE_NE |
|
OPERATION_TYPE_LT |
|
OPERATION_TYPE_LE |
|
OPERATION_TYPE_GT |
|
OPERATION_TYPE_GE |
|