> ## 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.

# RuleError Object (IRuleError Interface)

This object corresponds to a rule error. Rules are certain conditions imposed on data in fields. If the values in documents do not meet these conditions, rule errors appear. The main purpose of rule application is to check the integrity of document data. All rule errors of a document are represented by the [**RuleErrors**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ruleerrors.md) object.

## Properties

| **Name** | **Type** | **Description** |
| - | - | - |
| **Context** | [**Field**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/field.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Specifies the field which was used as the context of the rule during rule checking. |
| **Fields** | [**Fields**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fields.md) | Returns a collection of checked fields. |
| **FieldToFocus** | [**Field**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/field.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Specifies the field to put focus on. |
| **IsFormatError** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Specifies whether the error is a format error. Data entry fields usually require data in special format as their input values. If during document processing the recognized field value does not match the set data type, the rule error is generated, and this property for corresponding rule error returns TRUE. |
| **Rule** | [**Rule**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rule.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Specifies the rule which produced the error. The value of this property may be 0, if the value of the **IsFormatError** property is TRUE. |
| **Severity** | [**RuleErrorSeverityEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ruleerrorseverityenum.md), read-only | Specifies the severity of the error. |
| **Text** | [**String**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Stores the text description of the error. |

## Related objects

![](https://mintcdn.com/abbyy/DG4YBah30S0eFFo5/images/flexi-capture/sdk/RuleError.gif?s=6596ed8994af40ce53b76e3e3d56fa2e)

## Output parameter

This object is the output parameter of the [**Item**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/item.md) method of the [**RuleErrors**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ruleerrors.md) object.

## See also

[**RuleErrors**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ruleerrors.md)

[Working with Properties](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md)
