---
title: "Class ValidationFailure"
slug: "sdk--stylelabs.m.sdk.exceptions.validationfailure"
abstract: ""
---
# Class ValidationFailure

Describes a validation failure.

## Inheritance

object

ValidationFailure

## Namespace: StylelabsStylelabs.MSdkExceptions

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class ValidationFailure
```

## Constructors

### ValidationFailure(string, string)

Initializes a new instance of the [ValidationFailure](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.validationfailure.html) class.

#### Declaration

```csharp
public ValidationFailure(string message, string source)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | message | A description of why the item is invalid. |
| string | source | The item that is invalid. |

## Properties

### Message

Gets a description of why the item is invalid.

#### Declaration

```csharp
public string Message { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Source

Gets the item that is invalid, e.g. a property or relation.

#### Declaration

```csharp
public string Source { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

## Methods

### ToString()

#### Declaration

```csharp
public override string ToString()
```

#### Returns

| Type | Description |
| --- | --- |
| string |  |
