# Validate

> Returns true if the detail prototype is valid and the Terrain can accept it.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

## Validate()

Returns `true` if the detail prototype is valid and the Terrain can accept it.

```csharp
public bool Validate()
```

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

## Validate(string)

Returns `true` if the detail prototype is valid and the Terrain can accept it.

```csharp
public bool Validate(out string errorMessage)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Returns a message that indicates the cause of failed validation.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |
