# ValidationFailure Class

> ValidationFailure class in the TX Sheet Control .NET API: Detached cell validation failure; stop-style violations roll back the entire attempted transaction.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Implements:** `System.IEquatable<TXTextControl.TXSheetControl.Server.ValidationFailure>`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > ValidationFailure Class
- **789 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/llms-full.txt

---

Detached cell validation failure; stop-style violations roll back the entire attempted transaction.

### Syntax

```csharp
public class ValidationFailure
```

Interfaces: `IEquatable<ValidationFailure>`.

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [Address](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/address-property/llms-full.txt) |  |
| [Message](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/message-property/llms-full.txt) |  |
| [Rule](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/rule-property/llms-full.txt) |  |

### Examples

Create a working document workflow using ValidationFailure. Return the generated document or application data to the caller.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<string[]> BuildValidationFailureExampleAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("B8").SetValueAsync(-5);
    await sheet.Validation.SetAsync("B8:B9", new ValidationRule { Type = "decimal", Operator = "between", Formula1 = "0", Formula2 = "10000", ErrorMessage = "Enter an amount between 0 and 10000." });

    var failures = await sheet.Validation.CheckAsync("B8");
    return failures.Select(failure => failure.Address + ": " + failure.Message).ToArray();
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Data Validation](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/validation/llms-full.txt)

---

## In This Section

- [ValidationFailure.Address Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/address-property/llms-full.txt): ValidationFailure.Address property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [ValidationFailure Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/constructor/llms-full.txt): ValidationFailure constructor in the TX Sheet Control .NET API, with its syntax, a C# example and remarks on awaiting tasks and handles.
- [ValidationFailure.Message Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/message-property/llms-full.txt): ValidationFailure.Message property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [ValidationFailure.Rule Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/rule-property/llms-full.txt): ValidationFailure.Rule property in the TX Sheet Control .NET API, with its syntax, its type ValidationRule and a C# example.

---

## Nearby

- **Previous:** [Validation.SetAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validation/setasync-method/llms-full.txt)
- **Next:** [ValidationFailure Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/validationfailure/constructor/llms-full.txt)
