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

# CSharp: TerraformVariableValidationConfig

> CDKTN Core API Reference for TerraformVariableValidationConfig in CSharp.

Add one or more validation blocks within the variable block to specify custom conditions.

## Initializer <a name="Initializer" id="cdktn.TerraformVariableValidationConfig.Initializer" />

```csharp theme={null}
using Io.Cdktn;

new TerraformVariableValidationConfig {
    object Condition,
    string ErrorMessage
};
```

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                                               | **Type**            | **Description**                                                                                                                    |
| ------------------------------------------------------------------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.TerraformVariableValidationConfig.property.condition">Condition</a></code>       | <code>object</code> | This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not. |
| <code><a href="#cdktn.TerraformVariableValidationConfig.property.errorMessage">ErrorMessage</a></code> | <code>string</code> | This contains the text that Terraform will include as part of error messages when it detects an unmet condition.                   |

***

### `Condition`<sup>Required</sup> <a name="Condition" id="cdktn.TerraformVariableValidationConfig.property.condition" />

```csharp theme={null}
public object Condition { get; set; }
```

* *Type:* object

This is a boolean expression that should return true if the intended assumption or guarantee is fulfilled or false if it does not.

***

### `ErrorMessage`<sup>Required</sup> <a name="ErrorMessage" id="cdktn.TerraformVariableValidationConfig.property.errorMessage" />

```csharp theme={null}
public string ErrorMessage { get; set; }
```

* *Type:* string

This contains the text that Terraform will include as part of error messages when it detects an unmet condition.

***
