> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Required, optional, and prohibited elements

> Set search elements as required, optional, or prohibited to control how Advanced Designer continues matching when an object is absent or incorrectly detected.

Semi-structured documents are different from structured documents in that their set of fields varies from image to image. When creating an element, you need to keep in mind that the corresponding object may not appear on some images, making it impossible to detect it on them. Images can also be scanned incorrectly (e.g. some areas may become too dark or too bright), leading to a loss of data. In this case, the corresponding object will also not be detected. The Extraction Rules Activity Editor lets the program continue searching for other elements if a specific element is absent on an image. To continue matching for images that do not contain a specific object, that object needs to be set as optional.

## Required elements

Image objects described using **required** elements are meant to always be present on an image, and they need to be detected when matching an Extraction Rules activity. However, if such an object is not detected, matching is stopped.

## Optional elements

Image objects described using **optional** elements may be absent on an image or may not be detected. Unlike required elements however, this does not cause matching to stop, and image objects described by other elements will still be detected.

By default, all simple elements are optional, which means they are not required to be present on images. Unlike simple elements, all compound elements are set as required by default.

## Prohibited elements

Sometimes, the presence of a specific element should mean that a hypothesis chain is incorrect. Such elements are called **prohibited** elements. Detecting this element type stops the generation of the hypothesis tree in which the element was detected. These elements can be used to prevent the matching of an incorrect Extraction Rules activity to a document.

## Configure element type

To change whether an element is required, optional, or prohibited, use the **Element is** property on the **Properties** pane.
